Просмотр исходного кода

Revert "fix type"

This reverts commit 4980d1d9235734a80409274f47cb079297caea06.
Shun Miyazawa 3 лет назад
Родитель
Сommit
12dfa943bb
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 { useEffect } from 'react';
 
 
 import type {
 import type {
-  IPageInfoForEntity, IPagePopulatedToShowRevision,
+  IPageInfoForEntity, IPagePopulatedToShowRevision, Nullable,
 } from '@growi/core';
 } from '@growi/core';
 import { isClient, pagePathUtils } from '@growi/core';
 import { isClient, pagePathUtils } from '@growi/core';
 import useSWR, { Key, SWRResponse } from 'swr';
 import useSWR, { Key, SWRResponse } from 'swr';
@@ -80,11 +80,11 @@ export const useSWRxCurrentPage = (
 };
 };
 
 
 
 
-export const useSWRxTagsInfo = (pageId?: string): SWRResponse<IPageTagsInfo | undefined, Error> => {
+export const useSWRxTagsInfo = (pageId: Nullable<string>): SWRResponse<IPageTagsInfo | undefined, Error> => {
   const endpoint = `/pages.getPageTag?pageId=${pageId}`;
   const endpoint = `/pages.getPageTag?pageId=${pageId}`;
   const key = pageId != null ? [endpoint, pageId] : null;
   const key = pageId != null ? [endpoint, pageId] : null;
 
 
-  const fetcher = async(endpoint: string, pageId?: string) => {
+  const fetcher = async(endpoint: string, pageId: Nullable<string>) => {
     let tags: string[] = [];
     let tags: string[] = [];
     // when the page exists
     // when the page exists
     if (pageId != null) {
     if (pageId != null) {