MCPcopy Create free account
hub / github.com/bytebase/bytebase / useSQLEditorTabState

Function useSQLEditorTabState

frontend/src/react/stores/sqlEditor/tab.ts:554–558  ·  view source on GitHub ↗
(
  selector: (state: SQLEditorTabsState) => T
)

Source from the content-addressed store, hash-verified

552 * const currentTabId = useSQLEditorTabState((s) => s.currentTabId);
553 */
554export function useSQLEditorTabState<T>(
555 selector: (state: SQLEditorTabsState) => T
556): T {
557 return useSQLEditorTabsStore(selector);
558}
559
560// Re-hydrate tabs whenever the active project changes. Mirrors the
561// historical `watch(() => project.value, initProject)` side effect of

Callers 15

HistoryPaneFunction · 0.90
AdminModeButtonFunction · 0.90
OpenAIButtonFunction · 0.90
EditorActionFunction · 0.90
useSQLEditorAutoSaveFunction · 0.90
SQLEditorRouteShellFunction · 0.90
TabListFunction · 0.90
ContainerChooserFunction · 0.90
SchemaChooserFunction · 0.90
useHistoryFunction · 0.90
CompactSQLEditorFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected