Przeglądaj źródła

import some components dynamically

Yuki Takei 1 rok temu
rodzic
commit
3d204e4fe0
1 zmienionych plików z 4 dodań i 1 usunięć
  1. 4 1
      apps/app/src/pages/share/[[...path]].page.tsx

+ 4 - 1
apps/app/src/pages/share/[[...path]].page.tsx

@@ -5,13 +5,13 @@ import type {
   GetServerSideProps, GetServerSidePropsContext,
 } from 'next';
 import { serverSideTranslations } from 'next-i18next/serverSideTranslations';
+import dynamic from 'next/dynamic';
 import Head from 'next/head';
 import superjson from 'superjson';
 
 import { ShareLinkLayout } from '~/components-universal/Layout/ShareLinkLayout';
 import { DrawioViewerScript } from '~/components-universal/Script/DrawioViewerScript';
 import { ShareLinkPageView } from '~/components-universal/ShareLinkPageView';
-import GrowiContextualSubNavigationSubstance from '~/components/Navbar/GrowiContextualSubNavigation';
 import type { SupportedActionType } from '~/interfaces/activity';
 import { SupportedAction } from '~/interfaces/activity';
 import type { CrowiRequest } from '~/interfaces/crowi-request';
@@ -33,6 +33,9 @@ import {
 } from '../utils/commons';
 
 
+const GrowiContextualSubNavigationSubstance = dynamic(() => import('~/components/Navbar/GrowiContextualSubNavigation'), { ssr: false });
+
+
 const logger = loggerFactory('growi:next-page:share');
 
 type Props = CommonProps & {