forked from github/plane
chore: handled the auto reload issue in auth-wrapper and instance wrapper (#4520)
This commit is contained in:
parent
b4b111e297
commit
603ebeb123
@ -60,7 +60,7 @@ export const AuthenticationWrapper: FC<TAuthenticationWrapper> = observer((props
|
||||
return redirectionRoute;
|
||||
};
|
||||
|
||||
if (isUserSWRLoading || isUserLoading)
|
||||
if ((isUserSWRLoading || isUserLoading) && !currentUser?.id)
|
||||
return (
|
||||
<div className="relative flex h-screen w-full items-center justify-center">
|
||||
<LogoSpinner />
|
||||
|
@ -16,12 +16,12 @@ export const InstanceWrapper: FC<TInstanceWrapper> = observer((props) => {
|
||||
// store
|
||||
const { isLoading, instance, error, fetchInstanceInfo } = useInstance();
|
||||
|
||||
useSWR("INSTANCE_INFORMATION", () => fetchInstanceInfo(), {
|
||||
const { isLoading: isInstanceSWRLoading } = useSWR("INSTANCE_INFORMATION", () => fetchInstanceInfo(), {
|
||||
revalidateOnFocus: false,
|
||||
});
|
||||
|
||||
// loading state
|
||||
if (isLoading)
|
||||
if ((isLoading || isInstanceSWRLoading) && !instance)
|
||||
return (
|
||||
<div className="relative flex h-screen w-full items-center justify-center">
|
||||
<LogoSpinner />
|
||||
|
Loading…
Reference in New Issue
Block a user