Parcourir la source

fix missed change

Yuki Takei il y a 8 mois
Parent
commit
f879425430
1 fichiers modifiés avec 3 ajouts et 3 suppressions
  1. 3 3
      apps/app/src/client/components/Bookmarks/BookmarkItem.tsx

+ 3 - 3
apps/app/src/client/components/Bookmarks/BookmarkItem.tsx

@@ -52,7 +52,7 @@ export const BookmarkItem = (props: Props): JSX.Element => {
   const [isRenameInputShown, setRenameInputShown] = useState(false);
   const [isRenameInputShown, setRenameInputShown] = useState(false);
 
 
   const { data: pageInfo, mutate: mutatePageInfo } = useSWRxPageInfo(bookmarkedPage?._id);
   const { data: pageInfo, mutate: mutatePageInfo } = useSWRxPageInfo(bookmarkedPage?._id);
-  const { fetchAndUpdatePage } = useFetchCurrentPage();
+  const { fetchCurrentPage } = useFetchCurrentPage();
 
 
   const paddingLeft = BASE_BOOKMARK_PADDING + (BASE_FOLDER_PADDING * (level));
   const paddingLeft = BASE_BOOKMARK_PADDING + (BASE_FOLDER_PADDING * (level));
   const dragItem: Partial<DragItemDataType> = {
   const dragItem: Partial<DragItemDataType> = {
@@ -146,7 +146,7 @@ export const BookmarkItem = (props: Props): JSX.Element => {
         mutateAllPageInfo();
         mutateAllPageInfo();
         bookmarkFolderTreeMutation();
         bookmarkFolderTreeMutation();
         router.push(`/${pageId}`);
         router.push(`/${pageId}`);
-        fetchAndUpdatePage();
+        fetchCurrentPage();
         toastSuccess(t('page_has_been_reverted', { path }));
         toastSuccess(t('page_has_been_reverted', { path }));
       }
       }
       catch (err) {
       catch (err) {
@@ -154,7 +154,7 @@ export const BookmarkItem = (props: Props): JSX.Element => {
       }
       }
     };
     };
     openPutBackPageModal({ pageId, path }, { onPutBacked: putBackedHandler });
     openPutBackPageModal({ pageId, path }, { onPutBacked: putBackedHandler });
-  }, [bookmarkedPage, openPutBackPageModal, bookmarkFolderTreeMutation, router, fetchAndUpdatePage, t]);
+  }, [bookmarkedPage, openPutBackPageModal, bookmarkFolderTreeMutation, router, fetchCurrentPage, t]);
 
 
   if (bookmarkedPage == null) {
   if (bookmarkedPage == null) {
     return <></>;
     return <></>;