Explorar o código

Revert "Do not request /page/info when on a shared page"

This reverts commit b2c1a49c895d5f87adcf7b74f252ce64fe30492a.
Shun Miyazawa %!s(int64=3) %!d(string=hai) anos
pai
achega
d2cc23b04e
Modificáronse 1 ficheiros con 1 adicións e 4 borrados
  1. 1 4
      packages/app/src/stores/page.tsx

+ 1 - 4
packages/app/src/stores/page.tsx

@@ -116,14 +116,11 @@ export const useSWRxPageInfo = (
 
   const { data: termNumber } = usePageInfoTermManager();
 
-  const { data: pathname } = useCurrentPathname();
-  const isSharedPage = _isSharedPage(pathname ?? '');
-
   // assign null if shareLinkId is undefined in order to identify SWR key only by pageId
   const fixedShareLinkId = shareLinkId ?? null;
 
   const swrResult = useSWRImmutable<IPageInfo | IPageInfoForOperation, Error>(
-    !isSharedPage && pageId != null && termNumber != null ? ['/page/info', pageId, fixedShareLinkId, termNumber] : null,
+    pageId != null && termNumber != null ? ['/page/info', pageId, fixedShareLinkId, termNumber] : null,
     (endpoint, pageId, shareLinkId) => apiv3Get(endpoint, { pageId, shareLinkId }).then(response => response.data),
     { fallbackData: initialData },
   );