Yuki Takei 10 месяцев назад
Родитель
Сommit
717d80c0a9

+ 2 - 0
apps/app/src/client/components/Sidebar/SidebarContents.tsx

@@ -35,11 +35,13 @@ export const SidebarContents = memo(() => {
       case SidebarContentsType.BOOKMARKS:
         return Bookmarks;
       case SidebarContentsType.NOTIFICATION:
+        if (isGuestUser == null) return <></>; // wait for isGuestUser to be determined
         if (!isGuestUser) {
           return InAppNotification;
         }
         return PageTree;
       case SidebarContentsType.AI_ASSISTANT:
+        if (isAiEnabled == null) return <></>; // wait for isAiEnabled to be determined
         if (isAiEnabled) {
           return AiAssistant;
         }

+ 1 - 1
apps/app/src/client/components/Sidebar/SidebarNav/PrimaryItems.tsx

@@ -37,7 +37,7 @@ export const PrimaryItems = memo((props: Props) => {
       <PrimaryItem sidebarMode={sidebarMode} contents={SidebarContentsType.RECENT} label="Recent Changes" iconName="update" onHover={onItemHover} />
       <PrimaryItem sidebarMode={sidebarMode} contents={SidebarContentsType.BOOKMARKS} label="Bookmarks" iconName="bookmarks" onHover={onItemHover} />
       <PrimaryItem sidebarMode={sidebarMode} contents={SidebarContentsType.TAG} label="Tags" iconName="local_offer" onHover={onItemHover} />
-      {!isGuestUser && <PrimaryItemForNotification sidebarMode={sidebarMode} onHover={onItemHover} />}
+      {isGuestUser === false && <PrimaryItemForNotification sidebarMode={sidebarMode} onHover={onItemHover} />}
       {isAiEnabled && (
         <PrimaryItem
           sidebarMode={sidebarMode}