|
@@ -57,7 +57,7 @@ import loggerFactory from '~/utils/logger';
|
|
|
// import GrowiSubNavigationSwitcher from '../client/js/components/Navbar/GrowiSubNavigationSwitcher';
|
|
// import GrowiSubNavigationSwitcher from '../client/js/components/Navbar/GrowiSubNavigationSwitcher';
|
|
|
import { DescendantsPageListModal } from '../components/DescendantsPageListModal';
|
|
import { DescendantsPageListModal } from '../components/DescendantsPageListModal';
|
|
|
import { BasicLayoutWithEditorMode } from '../components/Layout/BasicLayout';
|
|
import { BasicLayoutWithEditorMode } from '../components/Layout/BasicLayout';
|
|
|
-import GrowiContextualSubNavigation from '../components/Navbar/GrowiContextualSubNavigation';
|
|
|
|
|
|
|
+import GrowiContextualSubNavigationSubstance from '../components/Navbar/GrowiContextualSubNavigation';
|
|
|
import DisplaySwitcher from '../components/Page/DisplaySwitcher';
|
|
import DisplaySwitcher from '../components/Page/DisplaySwitcher';
|
|
|
// import { serializeUserSecurely } from '../server/models/serializers/user-serializer';
|
|
// import { serializeUserSecurely } from '../server/models/serializers/user-serializer';
|
|
|
// import PageStatusAlert from '../client/js/components/PageStatusAlert';
|
|
// import PageStatusAlert from '../client/js/components/PageStatusAlert';
|
|
@@ -133,6 +133,20 @@ superjson.registerCustom<IPageToShowRevisionWithMeta, IPageToShowRevisionWithMet
|
|
|
'IPageToShowRevisionWithMetaTransformer',
|
|
'IPageToShowRevisionWithMetaTransformer',
|
|
|
);
|
|
);
|
|
|
|
|
|
|
|
|
|
+// GrowiContextualSubNavigation for NOT shared page
|
|
|
|
|
+type GrowiContextualSubNavigationProps = {
|
|
|
|
|
+ isLinkSharingDisabled: boolean,
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+const GrowiContextualSubNavigation = (props: GrowiContextualSubNavigationProps): JSX.Element => {
|
|
|
|
|
+ const { isLinkSharingDisabled } = props;
|
|
|
|
|
+ const { data: currentPage } = useSWRxCurrentPage();
|
|
|
|
|
+ return (
|
|
|
|
|
+ <div data-testid="grw-contextual-sub-nav">
|
|
|
|
|
+ <GrowiContextualSubNavigationSubstance currentPage={currentPage} isLinkSharingDisabled={isLinkSharingDisabled}/>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ );
|
|
|
|
|
+};
|
|
|
|
|
|
|
|
const IdenticalPathPage = (): JSX.Element => {
|
|
const IdenticalPathPage = (): JSX.Element => {
|
|
|
const IdenticalPathPage = dynamic(() => import('../components/IdenticalPathPage').then(mod => mod.IdenticalPathPage), { ssr: false });
|
|
const IdenticalPathPage = dynamic(() => import('../components/IdenticalPathPage').then(mod => mod.IdenticalPathPage), { ssr: false });
|
|
@@ -333,7 +347,7 @@ const Page: NextPageWithLayout<Props> = (props: Props) => {
|
|
|
<div className={`dynamic-layout-root ${growiLayoutFluidClass} h-100 d-flex flex-column justify-content-between`}>
|
|
<div className={`dynamic-layout-root ${growiLayoutFluidClass} h-100 d-flex flex-column justify-content-between`}>
|
|
|
<header className="py-0 position-relative">
|
|
<header className="py-0 position-relative">
|
|
|
<div id="grw-subnav-container">
|
|
<div id="grw-subnav-container">
|
|
|
- <GrowiContextualSubNavigation currentPage={pageWithMeta?.data} isLinkSharingDisabled={props.disableLinkSharing} />
|
|
|
|
|
|
|
+ <GrowiContextualSubNavigation isLinkSharingDisabled={props.disableLinkSharing} />
|
|
|
</div>
|
|
</div>
|
|
|
</header>
|
|
</header>
|
|
|
<div className="d-edit-none">
|
|
<div className="d-edit-none">
|