From 6b77e83ca0a14111fb675338102f7b0683ea1fcb Mon Sep 17 00:00:00 2001 From: Maze Winther Date: Sun, 22 Jun 2025 13:08:37 +0200 Subject: rename app provider to editor provider and add it to the editor instead --- apps/web/src/stores/app-store.ts | 35 ----------------------------------- apps/web/src/stores/editor-store.ts | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 35 deletions(-) delete mode 100644 apps/web/src/stores/app-store.ts create mode 100644 apps/web/src/stores/editor-store.ts (limited to 'apps/web/src/stores') diff --git a/apps/web/src/stores/app-store.ts b/apps/web/src/stores/app-store.ts deleted file mode 100644 index 746fdc45..00000000 --- a/apps/web/src/stores/app-store.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { create } from "zustand"; - -interface AppState { - // Loading states - isInitializing: boolean; - isPanelsReady: boolean; - - // Actions - setInitializing: (loading: boolean) => void; - setPanelsReady: (ready: boolean) => void; - initializeApp: () => Promise; -} - -export const useAppStore = create((set, get) => ({ - // Initial states - isInitializing: true, - isPanelsReady: false, - - // Actions - setInitializing: (loading) => { - set({ isInitializing: loading }); - }, - - setPanelsReady: (ready) => { - set({ isPanelsReady: ready }); - }, - - initializeApp: async () => { - console.log("Initializing video editor..."); - set({ isInitializing: true, isPanelsReady: false }); - - set({ isPanelsReady: true, isInitializing: false }); - console.log("Video editor ready"); - }, -})); diff --git a/apps/web/src/stores/editor-store.ts b/apps/web/src/stores/editor-store.ts new file mode 100644 index 00000000..746fdc45 --- /dev/null +++ b/apps/web/src/stores/editor-store.ts @@ -0,0 +1,35 @@ +import { create } from "zustand"; + +interface AppState { + // Loading states + isInitializing: boolean; + isPanelsReady: boolean; + + // Actions + setInitializing: (loading: boolean) => void; + setPanelsReady: (ready: boolean) => void; + initializeApp: () => Promise; +} + +export const useAppStore = create((set, get) => ({ + // Initial states + isInitializing: true, + isPanelsReady: false, + + // Actions + setInitializing: (loading) => { + set({ isInitializing: loading }); + }, + + setPanelsReady: (ready) => { + set({ isPanelsReady: ready }); + }, + + initializeApp: async () => { + console.log("Initializing video editor..."); + set({ isInitializing: true, isPanelsReady: false }); + + set({ isPanelsReady: true, isInitializing: false }); + console.log("Video editor ready"); + }, +})); -- cgit v1.3.1