Yuki Takei 8 месяцев назад
Родитель
Сommit
e62e1afb0a
1 измененных файлов с 2 добавлено и 3 удалено
  1. 2 3
      apps/app/src/states/page/fetch-current-page.ts

+ 2 - 3
apps/app/src/states/page/fetch-current-page.ts

@@ -2,7 +2,7 @@ import { useCallback, useState } from 'react';
 
 import type { IPagePopulatedToShowRevision } from '@growi/core';
 import { isClient } from '@growi/core/dist/utils';
-import { isPermalink } from '@growi/core/dist/utils/page-path-utils';
+import { isCreatablePage, isPermalink } from '@growi/core/dist/utils/page-path-utils';
 import { removeHeadingSlash } from '@growi/core/dist/utils/path-utils';
 import { useAtomCallback } from 'jotai/utils';
 
@@ -97,8 +97,7 @@ export const useFetchCurrentPage = (): {
 
           // Determine if page is creatable
           if (currentPath) {
-            const { pagePathUtils } = await import('@growi/core/dist/utils');
-            set(pageNotCreatableAtom, !pagePathUtils.isCreatablePage(currentPath));
+            set(pageNotCreatableAtom, !isCreatablePage(currentPath));
           }
           return null;
         }