Skip to content

armgit / plane

Public Imported from GitHub
0

πŸ”₯πŸ”₯πŸ”₯ Open-source Jira, Linear, Monday, and ClickUp alternative. Plane is a modern project management platform to manage tasks, sprints, docs, and triage.

chore: handled the auto reload issue in auth-wrapper and instance wrapper (#4520)

guru_sainath603ebeb1235e
diff --git a/web/lib/wrappers/authentication-wrapper.tsx b/web/lib/wrappers/authentication-wrapper.tsx
index 30c85cf8e3..8dfd5771aa 100644
--- a/web/lib/wrappers/authentication-wrapper.tsx
+++ b/web/lib/wrappers/authentication-wrapper.tsx
@@ -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 />
diff --git a/web/lib/wrappers/instance-wrapper.tsx b/web/lib/wrappers/instance-wrapper.tsx
index c0343a9e10..892838b7ef 100644
--- a/web/lib/wrappers/instance-wrapper.tsx
+++ b/web/lib/wrappers/instance-wrapper.tsx
@@ -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 />