Yuki Takei 8 месяцев назад
Родитель
Сommit
82fb5f11bb
2 измененных файлов с 3 добавлено и 1 удалено
  1. 1 1
      apps/app/src/pages/[[...path]].page.tsx
  2. 2 0
      apps/app/src/pages/utils/commons.ts

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

@@ -113,7 +113,7 @@ const GrowiContextualSubNavigation = (props: GrowiContextualSubNavigationProps):
 };
 };
 
 
 const isInitialProps = (props: Props): props is (InitialProps & SameRouteEachProps) => {
 const isInitialProps = (props: Props): props is (InitialProps & SameRouteEachProps) => {
-  return props.nextjsRoutingPage === NextjsRoutingType.INITIAL;
+  return 'isNextjsRoutingTypeInitial' in props && props.isNextjsRoutingTypeInitial;
 };
 };
 
 
 const Page: NextPageWithLayout<Props> = (props: Props) => {
 const Page: NextPageWithLayout<Props> = (props: Props) => {

+ 2 - 0
apps/app/src/pages/utils/commons.ts

@@ -5,6 +5,7 @@ import type { CrowiRequest } from '~/interfaces/crowi-request';
 import { getGrowiVersion } from '~/utils/growi-version';
 import { getGrowiVersion } from '~/utils/growi-version';
 
 
 export type CommonInitialProps = {
 export type CommonInitialProps = {
+  isNextjsRoutingTypeInitial: true,
   appTitle: string,
   appTitle: string,
   siteUrl: string | undefined,
   siteUrl: string | undefined,
   confidential: string,
   confidential: string,
@@ -27,6 +28,7 @@ export const getServerSideCommonInitialProps: GetServerSideProps<CommonInitialPr
 
 
   return {
   return {
     props: {
     props: {
+      isNextjsRoutingTypeInitial: true,
       appTitle: appService.getAppTitle(),
       appTitle: appService.getAppTitle(),
       siteUrl: configManager.getConfig('app:siteUrl'), // DON'T USE growiInfoService.getSiteUrl()
       siteUrl: configManager.getConfig('app:siteUrl'), // DON'T USE growiInfoService.getSiteUrl()
       confidential: appService.getAppConfidential() || '',
       confidential: appService.getAppConfidential() || '',