Przeglądaj źródła

add current id to key

ryoji-s 3 lat temu
rodzic
commit
d29045493a
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      apps/app/src/stores/context.tsx

+ 1 - 1
apps/app/src/stores/context.tsx

@@ -223,7 +223,7 @@ export const useIsReadOnlyUser = (): SWRResponse<boolean, Error> => {
   const isReadOnlyUser = !isGuestUser && !!currentUser?.readOnly;
 
   return useSWRImmutable(
-    isLoading ? null : ['isReadOnlyUser', isReadOnlyUser],
+    isLoading ? null : ['isReadOnlyUser', isReadOnlyUser, currentUser?._id],
     () => isReadOnlyUser,
     { fallbackData: isReadOnlyUser },
   );