|
@@ -3,7 +3,7 @@ import React, { FC } from 'react';
|
|
|
import { DevidedPagePath } from '@growi/core';
|
|
import { DevidedPagePath } from '@growi/core';
|
|
|
import dynamic from 'next/dynamic';
|
|
import dynamic from 'next/dynamic';
|
|
|
|
|
|
|
|
-import { useIsNotFound, useIsTrashPage } from '~/stores/context';
|
|
|
|
|
|
|
+import { useIsNotFound } from '~/stores/context';
|
|
|
|
|
|
|
|
import LinkedPagePath from '../models/linked-page-path';
|
|
import LinkedPagePath from '../models/linked-page-path';
|
|
|
|
|
|
|
@@ -26,7 +26,6 @@ const PagePathNav: FC<Props> = (props: Props) => {
|
|
|
const dPagePath = new DevidedPagePath(pagePath, false, true);
|
|
const dPagePath = new DevidedPagePath(pagePath, false, true);
|
|
|
|
|
|
|
|
const { data: isNotFound } = useIsNotFound();
|
|
const { data: isNotFound } = useIsNotFound();
|
|
|
- const { data: isTrashPage } = useIsTrashPage();
|
|
|
|
|
|
|
|
|
|
let formerLink;
|
|
let formerLink;
|
|
|
let latterLink;
|
|
let latterLink;
|
|
@@ -34,14 +33,14 @@ const PagePathNav: FC<Props> = (props: Props) => {
|
|
|
// one line
|
|
// one line
|
|
|
if (dPagePath.isRoot || dPagePath.isFormerRoot || isSingleLineMode) {
|
|
if (dPagePath.isRoot || dPagePath.isFormerRoot || isSingleLineMode) {
|
|
|
const linkedPagePath = new LinkedPagePath(pagePath);
|
|
const linkedPagePath = new LinkedPagePath(pagePath);
|
|
|
- latterLink = <PagePathHierarchicalLink linkedPagePath={linkedPagePath} isInTrash={isTrashPage} />;
|
|
|
|
|
|
|
+ latterLink = <PagePathHierarchicalLink linkedPagePath={linkedPagePath} />;
|
|
|
}
|
|
}
|
|
|
// two line
|
|
// two line
|
|
|
else {
|
|
else {
|
|
|
const linkedPagePathFormer = new LinkedPagePath(dPagePath.former);
|
|
const linkedPagePathFormer = new LinkedPagePath(dPagePath.former);
|
|
|
const linkedPagePathLatter = new LinkedPagePath(dPagePath.latter);
|
|
const linkedPagePathLatter = new LinkedPagePath(dPagePath.latter);
|
|
|
formerLink = <PagePathHierarchicalLink linkedPagePath={linkedPagePathFormer} />;
|
|
formerLink = <PagePathHierarchicalLink linkedPagePath={linkedPagePathFormer} />;
|
|
|
- latterLink = <PagePathHierarchicalLink linkedPagePath={linkedPagePathLatter} basePath={dPagePath.former} isInTrash={isTrashPage} />;
|
|
|
|
|
|
|
+ latterLink = <PagePathHierarchicalLink linkedPagePath={linkedPagePathLatter} basePath={dPagePath.former} />;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
const copyDropdownId = `copydropdown${isCompactMode ? '-subnav-compact' : ''}-${pageId}`;
|
|
const copyDropdownId = `copydropdown${isCompactMode ? '-subnav-compact' : ''}-${pageId}`;
|