From 15b6c37c2ecd05e44caf704351578df625b2df07 Mon Sep 17 00:00:00 2001 From: seaerchin Date: Thu, 19 Dec 2024 21:09:15 +0800 Subject: [PATCH] fix: collections active state --- .../dashboard/components/DirectorySidebar/useIsActive.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/studio/src/features/dashboard/components/DirectorySidebar/useIsActive.ts b/apps/studio/src/features/dashboard/components/DirectorySidebar/useIsActive.ts index e57201db03..7c64446808 100644 --- a/apps/studio/src/features/dashboard/components/DirectorySidebar/useIsActive.ts +++ b/apps/studio/src/features/dashboard/components/DirectorySidebar/useIsActive.ts @@ -28,8 +28,9 @@ export const useIsActive = ( case ResourceType.IndexPage: return siteProps.resourceId === currentResourceId case ResourceType.Folder: - case ResourceType.Collection: return siteProps.folderId === currentResourceId + case ResourceType.Collection: + return siteProps.resourceId === currentResourceId case ResourceType.CollectionLink: return siteProps.linkId === currentResourceId case ResourceType.FolderMeta: