fix: load view in useDatabaseOperations (#70)

This commit is contained in:
Richard Shiue
2025-09-11 20:04:13 +08:00
committed by GitHub
parent d3ce628d0d
commit 02ac0ee3ee

View File

@@ -65,9 +65,6 @@ export const AppBusinessLayer: React.FC<AppBusinessLayerProps> = ({ 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<AppBusinessLayerProps> = ({ children })
[pageOperations, loadTrash]
);
// Initialize database operations
const databaseOperations = useDatabaseOperations(enhancedLoadView, createRowDoc);
// Business context value
const businessContextValue: BusinessInternalContextType = useMemo(
() => ({