mirror of
https://github.com/supabase/supabase.git
synced 2026-10-13 05:09:12 +03:00
here we go again
This commit is contained in:
1 parent
dfae842bc6
commit
35cf4d9bc0
1 file changed
+12
-1
@@ -163,7 +163,18 @@ export const createTableEditorTableState = ({
|
||||
|
||||
export type TableEditorTableState = ReturnType<typeof createTableEditorTableState>
|
||||
|
||||
export const TableEditorTableStateContext = createContext<TableEditorTableState>(proxy({} as any))
|
||||
const DEFAULT_STATE_CONFIG = {
|
||||
projectRef: '',
|
||||
table: undefined as any,
|
||||
editable: undefined,
|
||||
onAddColumn: () => {},
|
||||
onExpandJSONEditor: () => {},
|
||||
onExpandTextEditor: () => {},
|
||||
}
|
||||
|
||||
export const TableEditorTableStateContext = createContext<TableEditorTableState>(
|
||||
createTableEditorTableState(DEFAULT_STATE_CONFIG)
|
||||
)
|
||||
|
||||
type TableEditorTableStateContextProviderProps = Omit<
|
||||
Parameters<typeof createTableEditorTableState>[0],
|
||||
|
||||
Reference in new issue
Block a user