Explorar el Código

replace useSWR to useSWRImmutable

kaori hace 4 años
padre
commit
39e58e1e52
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  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;