Shun Miyazawa 3 лет назад
Родитель
Сommit
4980d1d923
1 измененных файлов с 3 добавлено и 3 удалено
  1. 3 3
      packages/app/src/stores/page.tsx

+ 3 - 3
packages/app/src/stores/page.tsx

@@ -1,7 +1,7 @@
 import { useEffect } from 'react';
 
 import type {
-  IPageInfoForEntity, IPagePopulatedToShowRevision, Nullable,
+  IPageInfoForEntity, IPagePopulatedToShowRevision,
 } from '@growi/core';
 import { isClient, pagePathUtils } from '@growi/core';
 import useSWR, { Key, SWRResponse } from 'swr';
@@ -80,11 +80,11 @@ export const useSWRxCurrentPage = (
 };
 
 
-export const useSWRxTagsInfo = (pageId: Nullable<string>): SWRResponse<IPageTagsInfo | undefined, Error> => {
+export const useSWRxTagsInfo = (pageId?: string): SWRResponse<IPageTagsInfo | undefined, Error> => {
   const endpoint = `/pages.getPageTag?pageId=${pageId}`;
   const key = pageId != null ? [endpoint, pageId] : null;
 
-  const fetcher = async(endpoint: string, pageId: Nullable<string>) => {
+  const fetcher = async(endpoint: string, pageId?: string) => {
     let tags: string[] = [];
     // when the page exists
     if (pageId != null) {