clean up and simplifying more logic

This commit is contained in:
Hyteq
2025-06-24 08:10:11 +03:00
parent 55c95cd574
commit dc35619017
5 changed files with 156 additions and 544 deletions

View File

@ -3,7 +3,6 @@
import { useEffect } from "react";
import { Loader2 } from "lucide-react";
import { useEditorStore } from "@/stores/editor-store";
import { usePanelStore } from "@/stores/panel-store";
interface EditorProviderProps {
children: React.ReactNode;
@ -11,19 +10,10 @@ interface EditorProviderProps {
export function EditorProvider({ children }: EditorProviderProps) {
const { isInitializing, isPanelsReady, initializeApp } = useEditorStore();
const { setInitialized } = usePanelStore();
useEffect(() => {
const initialize = async () => {
// Initialize the app
await initializeApp();
// Initialize panel store for future resize events
setInitialized();
};
initialize();
}, [initializeApp, setInitialized]);
initializeApp();
}, [initializeApp]);
// Show loading screen while initializing
if (isInitializing || !isPanelsReady) {