From eab8ec3ba81b86fdd4ade920d999c28fb34785b1 Mon Sep 17 00:00:00 2001 From: Hyteq Date: Sun, 20 Jul 2025 10:48:40 +0300 Subject: format, cleanup, deps --- apps/web/src/components/editor-provider.tsx | 76 ++++++++++++++--------------- 1 file changed, 38 insertions(+), 38 deletions(-) (limited to 'apps/web/src/components/editor-provider.tsx') diff --git a/apps/web/src/components/editor-provider.tsx b/apps/web/src/components/editor-provider.tsx index d970f86d..55fdd6b0 100644 --- a/apps/web/src/components/editor-provider.tsx +++ b/apps/web/src/components/editor-provider.tsx @@ -1,38 +1,38 @@ -"use client"; - -import { useEffect } from "react"; -import { Loader2 } from "lucide-react"; -import { useEditorStore } from "@/stores/editor-store"; -import { useKeyboardShortcuts } from "@/hooks/use-keyboard-shortcuts"; - -interface EditorProviderProps { - children: React.ReactNode; -} - -export function EditorProvider({ children }: EditorProviderProps) { - const { isInitializing, isPanelsReady, initializeApp } = useEditorStore(); - - useKeyboardShortcuts({ - enabled: !isInitializing && isPanelsReady, - context: "editor", - }); - - useEffect(() => { - initializeApp(); - }, [initializeApp]); - - // Show loading screen while initializing - if (isInitializing || !isPanelsReady) { - return ( -
-
- -

Loading editor...

-
-
- ); - } - - // App is ready, render children - return <>{children}; -} +"use client"; + +import { useEffect } from "react"; +import { Loader2 } from "lucide-react"; +import { useEditorStore } from "@/stores/editor-store"; +import { useKeyboardShortcuts } from "@/hooks/use-keyboard-shortcuts"; + +interface EditorProviderProps { + children: React.ReactNode; +} + +export function EditorProvider({ children }: EditorProviderProps) { + const { isInitializing, isPanelsReady, initializeApp } = useEditorStore(); + + useKeyboardShortcuts({ + enabled: !isInitializing && isPanelsReady, + context: "editor", + }); + + useEffect(() => { + initializeApp(); + }, [initializeApp]); + + // Show loading screen while initializing + if (isInitializing || !isPanelsReady) { + return ( +
+
+ +

Loading editor...

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