mirror of
https://github.com/AppFlowy-IO/AppFlowy-Web.git
synced 2025-12-01 20:08:10 +08:00
fix: load view in useDatabaseOperations (#70)
This commit is contained in:
@@ -65,9 +65,6 @@ export const AppBusinessLayer: React.FC<AppBusinessLayerProps> = ({ children })
|
|||||||
// Initialize page operations
|
// Initialize page operations
|
||||||
const pageOperations = usePageOperations({ outline, loadOutline });
|
const pageOperations = usePageOperations({ outline, loadOutline });
|
||||||
|
|
||||||
// Initialize database operations
|
|
||||||
const databaseOperations = useDatabaseOperations(loadView, createRowDoc);
|
|
||||||
|
|
||||||
// Check if current view has been deleted
|
// Check if current view has been deleted
|
||||||
const viewHasBeenDeleted = useMemo(() => {
|
const viewHasBeenDeleted = useMemo(() => {
|
||||||
if (!viewId) return false;
|
if (!viewId) return false;
|
||||||
@@ -207,6 +204,9 @@ export const AppBusinessLayer: React.FC<AppBusinessLayerProps> = ({ children })
|
|||||||
[pageOperations, loadTrash]
|
[pageOperations, loadTrash]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Initialize database operations
|
||||||
|
const databaseOperations = useDatabaseOperations(enhancedLoadView, createRowDoc);
|
||||||
|
|
||||||
// Business context value
|
// Business context value
|
||||||
const businessContextValue: BusinessInternalContextType = useMemo(
|
const businessContextValue: BusinessInternalContextType = useMemo(
|
||||||
() => ({
|
() => ({
|
||||||
|
|||||||
Reference in New Issue
Block a user