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

@ -13,6 +13,7 @@ import { PreviewPanel } from "../../components/editor/preview-panel";
import { EditorHeader } from "@/components/editor-header";
import { usePanelStore } from "@/stores/panel-store";
import { useProjectStore } from "@/stores/project-store";
import { EditorProvider } from "@/components/editor-provider";
export default function Editor() {
const {
@ -38,59 +39,61 @@ export default function Editor() {
}, [activeProject, createNewProject]);
return (
<div className="h-screen w-screen flex flex-col bg-background">
<EditorHeader />
<ResizablePanelGroup direction="vertical">
<ResizablePanel
defaultSize={mainContent}
minSize={30}
onResize={setMainContent}
>
{/* Main content area */}
<ResizablePanelGroup direction="horizontal">
{/* Tools Panel */}
<ResizablePanel
defaultSize={toolsPanel}
minSize={15}
onResize={setToolsPanel}
>
<MediaPanel />
</ResizablePanel>
<EditorProvider>
<div className="h-screen w-screen flex flex-col bg-background">
<EditorHeader />
<ResizablePanelGroup direction="vertical">
<ResizablePanel
defaultSize={mainContent}
minSize={30}
onResize={setMainContent}
>
{/* Main content area */}
<ResizablePanelGroup direction="horizontal">
{/* Tools Panel */}
<ResizablePanel
defaultSize={toolsPanel}
minSize={15}
onResize={setToolsPanel}
>
<MediaPanel />
</ResizablePanel>
<ResizableHandle withHandle />
<ResizableHandle withHandle />
{/* Preview Area */}
<ResizablePanel
defaultSize={previewPanel}
onResize={setPreviewPanel}
>
<PreviewPanel />
</ResizablePanel>
{/* Preview Area */}
<ResizablePanel
defaultSize={previewPanel}
onResize={setPreviewPanel}
>
<PreviewPanel />
</ResizablePanel>
<ResizableHandle withHandle />
<ResizableHandle withHandle />
{/* Properties Panel */}
<ResizablePanel
defaultSize={propertiesPanel}
minSize={15}
onResize={setPropertiesPanel}
>
<PropertiesPanel />
</ResizablePanel>
</ResizablePanelGroup>
</ResizablePanel>
{/* Properties Panel */}
<ResizablePanel
defaultSize={propertiesPanel}
minSize={15}
onResize={setPropertiesPanel}
>
<PropertiesPanel />
</ResizablePanel>
</ResizablePanelGroup>
</ResizablePanel>
<ResizableHandle withHandle />
<ResizableHandle withHandle />
{/* Timeline */}
<ResizablePanel
defaultSize={timeline}
minSize={15}
onResize={setTimeline}
>
<Timeline />
</ResizablePanel>
</ResizablePanelGroup>
</div>
{/* Timeline */}
<ResizablePanel
defaultSize={timeline}
minSize={15}
onResize={setTimeline}
>
<Timeline />
</ResizablePanel>
</ResizablePanelGroup>
</div>
</EditorProvider>
);
}