kaori 3 лет назад
Родитель
Сommit
efd1e9134f

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

@@ -304,13 +304,13 @@ const GrowiContextualSubNavigation = (props: GrowiContextualSubNavigationProps):
         router.push(path);
         router.push(path);
       }
       }
       else {
       else {
-        // Do not use "router.push(`/${pageId}`)" to avoid `Error: Invariant: attempted to hard navigate to the same URL`
+        // Do not use "router.push(currentPathname)" to avoid `Error: Invariant: attempted to hard navigate to the same URL`
         // See: https://github.com/weseek/growi/pull/7061
         // See: https://github.com/weseek/growi/pull/7061
         router.reload();
         router.reload();
       }
       }
     };
     };
     openDeleteModal([pageWithMeta], { onDeleted: deletedHandler });
     openDeleteModal([pageWithMeta], { onDeleted: deletedHandler });
-  }, [openDeleteModal, reload, router]);
+  }, [openDeleteModal, router]);
 
 
   const switchContentWidthHandler = useCallback(async(pageId: string, value: boolean) => {
   const switchContentWidthHandler = useCallback(async(pageId: string, value: boolean) => {
     await updateContentWidth(pageId, value);
     await updateContentWidth(pageId, value);

+ 1 - 1
packages/app/src/components/PageAlert/TrashPageAlert.tsx

@@ -43,7 +43,7 @@ export const TrashPageAlert = (): JSX.Element => {
       return;
       return;
     }
     }
     const putBackedHandler = () => {
     const putBackedHandler = () => {
-      // Do not use "router.push(path)" to avoid Err"
+      // Do not use "router.push(`/${pageId}`)" to avoid Err"
       // See: https://github.com/weseek/growi/pull/7054
       // See: https://github.com/weseek/growi/pull/7054
       router.reload();
       router.reload();
     };
     };