Przeglądaj źródła

replace useSWR to useSWRImmutable

kaori 4 lat temu
rodzic
commit
39e58e1e52
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      packages/app/src/stores/ui.tsx

+ 1 - 1
packages/app/src/stores/ui.tsx

@@ -408,7 +408,7 @@ export const usePageRenameModalStatus = (status?: RenameModalStatus): SWRRespons
 
 export const usePageRenameModalOpened = (): SWRResponse<boolean, Error> => {
   const { data } = usePageRenameModalStatus();
-  return useSWR(
+  return useSWRImmutable(
     data != null ? ['isRenameModalOpened', data] : null,
     () => {
       return data != null ? data.isOpened : false;