diff --git a/src/components/app/layers/AppBusinessLayer.tsx b/src/components/app/layers/AppBusinessLayer.tsx index edfc6be3..229aff2e 100644 --- a/src/components/app/layers/AppBusinessLayer.tsx +++ b/src/components/app/layers/AppBusinessLayer.tsx @@ -65,9 +65,6 @@ export const AppBusinessLayer: React.FC = ({ children }) // Initialize page operations const pageOperations = usePageOperations({ outline, loadOutline }); - // Initialize database operations - const databaseOperations = useDatabaseOperations(loadView, createRowDoc); - // Check if current view has been deleted const viewHasBeenDeleted = useMemo(() => { if (!viewId) return false; @@ -207,6 +204,9 @@ export const AppBusinessLayer: React.FC = ({ children }) [pageOperations, loadTrash] ); + // Initialize database operations + const databaseOperations = useDatabaseOperations(enhancedLoadView, createRowDoc); + // Business context value const businessContextValue: BusinessInternalContextType = useMemo( () => ({