yohei0125 пре 3 година
родитељ
комит
c3b379c2c3
1 измењених фајлова са 2 додато и 2 уклоњено
  1. 2 2
      packages/app/src/stores/page.tsx

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

@@ -34,8 +34,8 @@ export const useSWRxPageByPath = (path?: string): SWRResponse<IPageHasId, Error>
 export const useSWRxCurrentPage = (shareLinkId?: string): SWRResponse<IPageHasId, Error> => {
 export const useSWRxCurrentPage = (shareLinkId?: string): SWRResponse<IPageHasId, Error> => {
   const { data: currentPageId } = useCurrentPageId();
   const { data: currentPageId } = useCurrentPageId();
   const { data: isEmptyPage } = useIsEmptyPage();
   const { data: isEmptyPage } = useIsEmptyPage();
-  const isPageIdExist = !isEmptyPage && currentPageId != null; // False if the page is empty
-  return useSWRxPage(isPageIdExist ? currentPageId : undefined, shareLinkId);
+  const isNonEmptyPageId = currentPageId != null && !isEmptyPage; // False if the page is empty
+  return useSWRxPage(isNonEmptyPageId ? currentPageId : undefined, shareLinkId);
 };
 };
 
 
 // eslint-disable-next-line @typescript-eslint/no-unused-vars
 // eslint-disable-next-line @typescript-eslint/no-unused-vars