|
@@ -16,7 +16,7 @@ import { IResTagsUpdateApiv1 } from '~/interfaces/tag';
|
|
|
import { OnDuplicatedFunction, OnRenamedFunction, OnDeletedFunction } from '~/interfaces/ui';
|
|
import { OnDuplicatedFunction, OnRenamedFunction, OnDeletedFunction } from '~/interfaces/ui';
|
|
|
import {
|
|
import {
|
|
|
useCurrentPageId,
|
|
useCurrentPageId,
|
|
|
- useCurrentPathname,
|
|
|
|
|
|
|
+ useCurrentPathname, useIsTrashTopPage,
|
|
|
useCurrentUser, useIsGuestUser, useIsSharedUser, useShareLinkId, useTemplateTagData,
|
|
useCurrentUser, useIsGuestUser, useIsSharedUser, useShareLinkId, useTemplateTagData,
|
|
|
} from '~/stores/context';
|
|
} from '~/stores/context';
|
|
|
import { usePageTagsForEditors } from '~/stores/editor';
|
|
import { usePageTagsForEditors } from '~/stores/editor';
|
|
@@ -180,6 +180,7 @@ const GrowiContextualSubNavigation = (props: GrowiContextualSubNavigationProps):
|
|
|
const { data: isGuestUser } = useIsGuestUser();
|
|
const { data: isGuestUser } = useIsGuestUser();
|
|
|
const { data: isSharedUser } = useIsSharedUser();
|
|
const { data: isSharedUser } = useIsSharedUser();
|
|
|
const { data: shareLinkId } = useShareLinkId();
|
|
const { data: shareLinkId } = useShareLinkId();
|
|
|
|
|
+ const { data: isTrashTopPage } = useIsTrashTopPage();
|
|
|
|
|
|
|
|
const { data: isAbleToShowPageManagement } = useIsAbleToShowPageManagement();
|
|
const { data: isAbleToShowPageManagement } = useIsAbleToShowPageManagement();
|
|
|
const { data: isAbleToShowTagLabel } = useIsAbleToShowTagLabel();
|
|
const { data: isAbleToShowTagLabel } = useIsAbleToShowTagLabel();
|
|
@@ -365,9 +366,13 @@ const GrowiContextualSubNavigation = (props: GrowiContextualSubNavigationProps):
|
|
|
path: currentPathname,
|
|
path: currentPathname,
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
|
|
+ const trashTopPage: Partial<IPageHasId> = {
|
|
|
|
|
+ path: '/trash',
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
return (
|
|
return (
|
|
|
<GrowiSubNavigation
|
|
<GrowiSubNavigation
|
|
|
- page={currentPage ?? notFoundPage}
|
|
|
|
|
|
|
+ page={isTrashTopPage ? trashTopPage : currentPage ?? notFoundPage}
|
|
|
showDrawerToggler={isDrawerMode}
|
|
showDrawerToggler={isDrawerMode}
|
|
|
showTagLabel={isAbleToShowTagLabel}
|
|
showTagLabel={isAbleToShowTagLabel}
|
|
|
showPageAuthors={isAbleToShowPageAuthors}
|
|
showPageAuthors={isAbleToShowPageAuthors}
|