From 5bc6392c5c6a7ea6aff4f399e3657e1e26fa526d Mon Sep 17 00:00:00 2001 From: francesco Date: Wed, 11 Sep 2024 02:47:39 +0200 Subject: [PATCH] Fix for Cloud drawer --- .../src/components/FireCMSCloudDrawer.tsx | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/packages/firecms_cloud/src/components/FireCMSCloudDrawer.tsx b/packages/firecms_cloud/src/components/FireCMSCloudDrawer.tsx index 0f0dee489..9ebb11d64 100644 --- a/packages/firecms_cloud/src/components/FireCMSCloudDrawer.tsx +++ b/packages/firecms_cloud/src/components/FireCMSCloudDrawer.tsx @@ -4,8 +4,8 @@ import { DrawerNavigationItem, IconForView, TopNavigationResult, - useAuthController, useApp, + useAuthController, useNavigationController } from "@firecms/core"; import { AddIcon, Button, Tooltip, Typography, } from "@firecms/ui"; @@ -44,10 +44,10 @@ export function FireCMSCloudDrawer() { }: TopNavigationResult = navigation.topLevelNavigation; const buildGroupHeader = useCallback((group?: string) => { - if (!drawerOpen) return
; + if (!drawerOpen) return
; const reservedGroup = group && RESERVED_GROUPS.includes(group); const canCreateCollections = collectionEditorController.configPermissions({ user }).createCollections && !reservedGroup; - return
+ return
@@ -79,11 +79,15 @@ export function FireCMSCloudDrawer() { <> -
+ +
{groups.map((group) => ( - +
{buildGroupHeader(group)} {Object.values(navigationEntries) .filter(e => e.group === group) @@ -95,7 +99,7 @@ export function FireCMSCloudDrawer() { drawerOpen={drawerOpen} url={view.url} name={view.name}/>)} - +
))}