rename app provider to editor provider and add it to the editor instead

This commit is contained in:
Maze Winther
2025-06-22 13:08:37 +02:00
parent be97024868
commit 6b77e83ca0
4 changed files with 59 additions and 59 deletions

View File

@ -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<void>;
}
export const useAppStore = create<AppState>((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");
},
}));