|
@@ -1,4 +1,5 @@
|
|
|
-import React, { FC } from 'react';
|
|
|
|
|
|
|
+import type { FC } from 'react';
|
|
|
|
|
+import React from 'react';
|
|
|
|
|
|
|
|
import { DevidedPagePath } from '@growi/core/dist/models';
|
|
import { DevidedPagePath } from '@growi/core/dist/models';
|
|
|
import { pagePathUtils } from '@growi/core/dist/utils';
|
|
import { pagePathUtils } from '@growi/core/dist/utils';
|
|
@@ -27,9 +28,12 @@ type Props = {
|
|
|
|
|
|
|
|
const CopyDropdown = dynamic(() => import('../CopyDropdown').then(mod => mod.CopyDropdown), { ssr: false });
|
|
const CopyDropdown = dynamic(() => import('../CopyDropdown').then(mod => mod.CopyDropdown), { ssr: false });
|
|
|
|
|
|
|
|
-const Separator = (): JSX.Element => {
|
|
|
|
|
|
|
+const RootSlash = (): JSX.Element => {
|
|
|
return <span className={styles['grw-mr-02em']}>/</span>;
|
|
return <span className={styles['grw-mr-02em']}>/</span>;
|
|
|
};
|
|
};
|
|
|
|
|
+const Separator = (): JSX.Element => {
|
|
|
|
|
+ return <span className={styles['grw-mx-02em']}>/</span>;
|
|
|
|
|
+};
|
|
|
|
|
|
|
|
export const PagePathNav: FC<Props> = (props: Props) => {
|
|
export const PagePathNav: FC<Props> = (props: Props) => {
|
|
|
const {
|
|
const {
|
|
@@ -66,10 +70,15 @@ export const PagePathNav: FC<Props> = (props: Props) => {
|
|
|
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} isInTrash={isInTrash} />;
|
|
|
|
|
- latterLink = (
|
|
|
|
|
|
|
+ formerLink = (
|
|
|
<>
|
|
<>
|
|
|
|
|
+ <PagePathHierarchicalLink linkedPagePath={linkedPagePathFormer} isInTrash={isInTrash} />
|
|
|
<Separator />
|
|
<Separator />
|
|
|
|
|
+ </>
|
|
|
|
|
+ );
|
|
|
|
|
+ latterLink = (
|
|
|
|
|
+ <>
|
|
|
|
|
+ <RootSlash />
|
|
|
<PagePathHierarchicalLink linkedPagePath={linkedPagePathLatter} basePath={dPagePath.former} isInTrash={isInTrash} />
|
|
<PagePathHierarchicalLink linkedPagePath={linkedPagePathLatter} basePath={dPagePath.former} isInTrash={isInTrash} />
|
|
|
</>
|
|
</>
|
|
|
);
|
|
);
|