diff --git a/src/appState.ts b/src/appState.ts index 435aeeb..a2271b2 100644 --- a/src/appState.ts +++ b/src/appState.ts @@ -6,6 +6,8 @@ import { Theme } from "./types/theme" export function createAppState() { const appState: Signal = signal({ boards: [] }) const appTheme: Signal = signal(getTheme()) + const showCommandPalette = signal(false) + const showBoardDialog = signal(false) - return { appState, appTheme } + return { appState, appTheme, showCommandPalette, showBoardDialog } } diff --git a/src/main.tsx b/src/main.tsx index e7d383c..7ec71d1 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -21,12 +21,8 @@ import { applyTheme } from './utils.ts' import { State } from './types/state.ts' import PageSandbox from './components/PageSandbox.tsx' import TheCommandPalette from './components/TheCommandPalette.tsx' -import { signal } from '@preact/signals' -const { appState, appTheme } = createAppState() - -export const showCommandPalette = signal(false) -export const showBoardDialog = signal(false) +export const { appState, appTheme, showCommandPalette, showBoardDialog } = createAppState() function Main() { const repository = new RepositoryLocalStorage()