소스 검색

clean code

kaori 3 년 전
부모
커밋
b10308fdd8
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      packages/app/src/components/Navbar/GrowiContextualSubNavigation.tsx

+ 2 - 2
packages/app/src/components/Navbar/GrowiContextualSubNavigation.tsx

@@ -167,15 +167,15 @@ const GrowiContextualSubNavigation = (props) => {
   const { data: isAbleToShowPageAuthors } = useIsAbleToShowPageAuthors();
   const { data: isAbleToShowPageAuthors } = useIsAbleToShowPageAuthors();
 
 
   const { mutate: mutateSWRTagsInfo, data: tagsInfoData } = useSWRxTagsInfo(pageId);
   const { mutate: mutateSWRTagsInfo, data: tagsInfoData } = useSWRxTagsInfo(pageId);
-  const { data: tagsOnEditMode, mutate: mutateTagsOnEditMode, sync: syncPageTagsForEditors } = usePageTagsForEditors(/* tagsInfoData?.tags */);
+  const { data: tagsOnEditMode, sync: syncPageTagsForEditors } = usePageTagsForEditors();
 
 
   const { open: openDuplicateModal } = usePageDuplicateModal();
   const { open: openDuplicateModal } = usePageDuplicateModal();
   const { open: openRenameModal } = usePageRenameModal();
   const { open: openRenameModal } = usePageRenameModal();
   const { open: openDeleteModal } = usePageDeleteModal();
   const { open: openDeleteModal } = usePageDeleteModal();
 
 
   useEffect(() => {
   useEffect(() => {
-    syncPageTagsForEditors(tagsInfoData?.tags);
     // Run only when tagsInfoData has been updated
     // Run only when tagsInfoData has been updated
+    syncPageTagsForEditors(tagsInfoData?.tags);
     // eslint-disable-next-line react-hooks/exhaustive-deps
     // eslint-disable-next-line react-hooks/exhaustive-deps
   }, [tagsInfoData?.tags]);
   }, [tagsInfoData?.tags]);