|
|
@@ -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;
|
|
|
|