Parcourir la source

declear endpoint variable

kaori il y a 3 ans
Parent
commit
82c5b14462
1 fichiers modifiés avec 2 ajouts et 1 suppressions
  1. 2 1
      packages/app/src/stores/page.tsx

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

@@ -100,7 +100,8 @@ export const useSWRxTagsInfo = (pageId: Nullable<string>, pagePath: Nullable<str
   const { data: templateTagData } = useTemplateTagData();
   const { data: shareLinkId } = useShareLinkId();
 
-  const key = [`/pages.getPageTag?pageId=${pageId}`, pageId, shareLinkId, pagePath];
+  const endpoint = `/pages.getPageTag?pageId=${pageId}`;
+  const key = [endpoint, pageId, shareLinkId, pagePath];
 
 
   const fetcher = async(endpoint: string, pageId: Nullable<string>, shareLinkId: Nullable<string>) => {