yohei0125 %!s(int64=3) %!d(string=hai) anos
pai
achega
9278ce918f
Modificáronse 1 ficheiros con 3 adicións e 3 borrados
  1. 3 3
      packages/app/src/components/PageAlert/PageStaleAlert.tsx

+ 3 - 3
packages/app/src/components/PageAlert/PageStaleAlert.tsx

@@ -5,10 +5,10 @@ import { useTranslation } from 'react-i18next';
 export const PageStaleAlert = ():JSX.Element => {
   const { t } = useTranslation()
   const { data: isEnabledStaleNotification } = useIsEnabledStaleNotification();
-  const { data: pageData } = useSWRxCurrentPage();
 
-  const shouldfetch = isEnabledStaleNotification;
-  const { data: pageInfo } = useSWRxPageInfo(shouldfetch ? pageData?._id : null);
+  // determine if it should fetch or not like useSWRxPageInfo below after https://redmine.weseek.co.jp/issues/96788
+  const { data: pageData } = useSWRxCurrentPage();
+  const { data: pageInfo } = useSWRxPageInfo(isEnabledStaleNotification ? pageData?._id : null);
 
   const contentAge = pageInfo?.contentAge;