|
|
@@ -3,6 +3,8 @@ import React, { FC } from 'react';
|
|
|
import { DevidedPagePath } from '@growi/core';
|
|
|
import dynamic from 'next/dynamic';
|
|
|
|
|
|
+import { useIsEmpty } from '~/stores/context';
|
|
|
+
|
|
|
import LinkedPagePath from '../models/linked-page-path';
|
|
|
|
|
|
import PagePathHierarchicalLink from './PagePathHierarchicalLink';
|
|
|
@@ -21,6 +23,8 @@ const PagePathNav: FC<Props> = (props: Props) => {
|
|
|
} = props;
|
|
|
const dPagePath = new DevidedPagePath(pagePath, false, true);
|
|
|
|
|
|
+ const { data: isEmpty } = useIsEmpty();
|
|
|
+
|
|
|
const CopyDropdown = dynamic(() => import('./Page/CopyDropdown'), { ssr: false });
|
|
|
|
|
|
let formerLink;
|
|
|
@@ -47,7 +51,7 @@ const PagePathNav: FC<Props> = (props: Props) => {
|
|
|
{formerLink}
|
|
|
<span className="d-flex align-items-center">
|
|
|
<h1 className="m-0">{latterLink}</h1>
|
|
|
- { pageId != null && (
|
|
|
+ { pageId != null && !isEmpty && (
|
|
|
<div className="mx-2">
|
|
|
<CopyDropdown pageId={pageId} pagePath={pagePath} dropdownToggleId={copyDropdownId} dropdownToggleClassName={copyDropdownToggleClassName}>
|
|
|
<i className="ti ti-clipboard"></i>
|