kaori пре 4 година
родитељ
комит
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> => {
 export const useDeleteModalPath = (): SWRResponse<any | null | undefined, Error> => {
-  const { data: currentPagePath } = useCurrentPagePath();
   const { data: status } = useDeleteModalStatus();
   const { data: status } = useDeleteModalStatus();
 
 
   return useSWR(
   return useSWR(
-    currentPagePath != null && status != null ? [currentPagePath, status] : null,
-    (currentPagePath, status) => {
-      return status?.pages || currentPagePath;
+    status != null ? [status] : null,
+    (status) => {
+      return status?.pages || null;
     },
     },
   );
   );
 };
 };