فهرست منبع

undisplayed TagLabels on /trash page

kaori 3 سال پیش
والد
کامیت
6181d0986d
1فایلهای تغییر یافته به همراه4 افزوده شده و 1 حذف شده
  1. 4 1
      packages/app/src/components/Navbar/GrowiSubNavigation.tsx

+ 4 - 1
packages/app/src/components/Navbar/GrowiSubNavigation.tsx

@@ -2,6 +2,7 @@ import React from 'react';
 
 
 import { IPageHasId } from '~/interfaces/page';
 import { IPageHasId } from '~/interfaces/page';
 import { IUser } from '~/interfaces/user';
 import { IUser } from '~/interfaces/user';
+import { useCurrentPagePath } from '~/stores/context';
 import {
 import {
   EditorMode, useEditorMode,
   EditorMode, useEditorMode,
 } from '~/stores/ui';
 } from '~/stores/ui';
@@ -33,6 +34,7 @@ type Props = {
 
 
 export const GrowiSubNavigation = (props: Props): JSX.Element => {
 export const GrowiSubNavigation = (props: Props): JSX.Element => {
   const { data: editorMode } = useEditorMode();
   const { data: editorMode } = useEditorMode();
+  const { data: currentPath } = useCurrentPagePath();
 
 
   const {
   const {
     page,
     page,
@@ -71,7 +73,8 @@ export const GrowiSubNavigation = (props: Props): JSX.Element => {
         ) }
         ) }
 
 
         <div className="grw-path-nav-container">
         <div className="grw-path-nav-container">
-          { showTagLabel && !isCompactMode && (
+          {/* "/trash" page does not exist on page collection and unable to add tags  */}
+          { showTagLabel && !isCompactMode && currentPath !== '/trash' && (
             <div className="grw-taglabels-container">
             <div className="grw-taglabels-container">
               <TagLabels tags={tags} isGuestUser={isGuestUser ?? false} tagsUpdateInvoked={tagsUpdatedHandler} />
               <TagLabels tags={tags} isGuestUser={isGuestUser ?? false} tagsUpdateInvoked={tagsUpdatedHandler} />
             </div>
             </div>