|
|
@@ -11,6 +11,7 @@ import { IRecordApplicableGrant, IResIsGrantNormalized } from '~/interfaces/page
|
|
|
import { IPagingResult } from '~/interfaces/paging-result';
|
|
|
|
|
|
import { apiGet } from '../client/util/apiv1-client';
|
|
|
+import { Nullable } from '../interfaces/common';
|
|
|
import { IPageTagsInfo } from '../interfaces/tag';
|
|
|
|
|
|
import { useCurrentPageId, useCurrentPagePath } from './context';
|
|
|
@@ -91,7 +92,7 @@ export const useSWRxDescendantsPageListForCurrrentPath = (pageNumber?: number):
|
|
|
return useSWRxPageList(path, pageNumber, termNumber);
|
|
|
};
|
|
|
|
|
|
-export const useSWRxTagsInfo = (pageId: string | null | undefined): SWRResponse<IPageTagsInfo, Error> => {
|
|
|
+export const useSWRxTagsInfo = (pageId: Nullable<string>): SWRResponse<IPageTagsInfo, Error> => {
|
|
|
const key = pageId == null ? null : `/pages.getPageTag?pageId=${pageId}`;
|
|
|
|
|
|
return useSWRImmutable(key, endpoint => apiGet(endpoint).then((response: IPageTagsInfo) => {
|