kaori 4 лет назад
Родитель
Сommit
7d4edc17fc
1 измененных файлов с 3 добавлено и 4 удалено
  1. 3 4
      packages/app/src/stores/ui.tsx

+ 3 - 4
packages/app/src/stores/ui.tsx

@@ -331,13 +331,12 @@ export const useDeleteModalOpened = (): SWRResponse<boolean, Error> => {
 };
 
 export const useDeleteModalPath = (): SWRResponse<any | null | undefined, Error> => {
-  const { data: currentPagePath } = useCurrentPagePath();
   const { data: status } = useDeleteModalStatus();
 
   return useSWR(
-    currentPagePath != null && status != null ? [currentPagePath, status] : null,
-    (currentPagePath, status) => {
-      return status?.pages || currentPagePath;
+    status != null ? [status] : null,
+    (status) => {
+      return status?.pages || null;
     },
   );
 };