Browse Source

setting addition

WNomunomu 2 years ago
parent
commit
8931d13805
1 changed files with 4 additions and 1 deletions
  1. 4 1
      apps/app/src/stores/context.tsx

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

@@ -237,7 +237,10 @@ export const useIsAdmin = (): SWRResponse<boolean, Error> => {
   return useSWRImmutable(
     isLoading ? null : ['isAdminUser', currentUser?._id],
     () => isAdminUser,
-    { fallbackData: isAdminUser },
+    {
+      fallbackData: isAdminUser,
+      keepPreviousData: true,
+    },
   );
 };