diff options
Diffstat (limited to 'apps/web/src/components/app-provider.tsx')
| -rw-r--r-- | apps/web/src/components/app-provider.tsx | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/apps/web/src/components/app-provider.tsx b/apps/web/src/components/app-provider.tsx deleted file mode 100644 index 257fc8fa..00000000 --- a/apps/web/src/components/app-provider.tsx +++ /dev/null @@ -1,42 +0,0 @@ -"use client";
-
-import { useEffect } from "react";
-import { Loader2 } from "lucide-react";
-import { useAppStore } from "@/stores/app-store";
-import { usePanelStore } from "@/stores/panel-store";
-
-interface AppProviderProps {
- children: React.ReactNode;
-}
-
-export function AppProvider({ children }: AppProviderProps) {
- const { isInitializing, isPanelsReady, initializeApp } = useAppStore();
- const { setInitialized } = usePanelStore();
-
- useEffect(() => {
- const initialize = async () => {
- // Initialize the app
- await initializeApp();
-
- // Initialize panel store for future resize events
- setInitialized();
- };
-
- initialize();
- }, [initializeApp, setInitialized]);
-
- // Show loading screen while initializing
- if (isInitializing || !isPanelsReady) {
- return (
- <div className="h-screen w-screen flex items-center justify-center bg-background">
- <div className="flex flex-col items-center gap-4">
- <Loader2 className="h-8 w-8 animate-spin text-muted-foreground" />
- <p className="text-sm text-muted-foreground">Loading editor...</p>
- </div>
- </div>
- );
- }
-
- // App is ready, render children
- return <>{children}</>;
-}
|
