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/components/app-provider.tsx | 42 -------------------------------- 1 file changed, 42 deletions(-) delete mode 100644 apps/web/src/components/app-provider.tsx (limited to 'apps/web/src/components/app-provider.tsx') 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 ( -
-
- -

Loading editor...

-
-
- ); - } - - // App is ready, render children - return <>{children}; -} -- cgit v1.3.1