The open-source CapCut alternative
refactor: consolidate default panel sizes into a constant for improved maintainability
Maze Winther9e01efdc8832
diff --git a/apps/web/src/stores/panel-store.ts b/apps/web/src/stores/panel-store.tsindex 7706417a..656fb062 100644--- a/apps/web/src/stores/panel-store.ts+++ b/apps/web/src/stores/panel-store.ts@@ -1,6 +1,14 @@import { create } from "zustand";import { persist } from "zustand/middleware";+const DEFAULT_PANEL_SIZES = {+ toolsPanel: 25,+ previewPanel: 75,+ propertiesPanel: 20,+ mainContent: 70,+ timeline: 30,+} as const;+interface PanelState {// Panel sizes as percentagestoolsPanel: number;@@ -21,11 +29,7 @@ export const usePanelStore = create<PanelState>()(persist((set) => ({// Default sizes - optimized for responsiveness- toolsPanel: 25,- previewPanel: 75,- propertiesPanel: 20,- mainContent: 70,- timeline: 30,+ ...DEFAULT_PANEL_SIZES,// ActionssetToolsPanel: (size) => set({ toolsPanel: size }),