[WEB-1929] chore: improve finishOnboarding logic to handle case where user profile setup is done and user already has a workspace. (#5105)
This commit is contained in:
parent
f06095f120
commit
ce89c7dcff
2 changed files with 22 additions and 9 deletions
|
|
@ -35,7 +35,7 @@ export const AuthenticationWrapper: FC<TAuthenticationWrapper> = observer((props
|
|||
const { isLoading: isUserLoading, data: currentUser, fetchCurrentUser } = useUser();
|
||||
const { data: currentUserProfile } = useUserProfile();
|
||||
const { data: currentUserSettings } = useUserSettings();
|
||||
const { workspaces } = useWorkspace();
|
||||
const { loader: workspacesLoader, workspaces } = useWorkspace();
|
||||
|
||||
const { isLoading: isUserSWRLoading } = useSWR("USER_INFORMATION", async () => await fetchCurrentUser(), {
|
||||
revalidateOnFocus: false,
|
||||
|
|
@ -73,7 +73,7 @@ export const AuthenticationWrapper: FC<TAuthenticationWrapper> = observer((props
|
|||
return redirectionRoute;
|
||||
};
|
||||
|
||||
if ((isUserSWRLoading || isUserLoading) && !currentUser?.id)
|
||||
if ((isUserSWRLoading || isUserLoading || workspacesLoader) && !currentUser?.id)
|
||||
return (
|
||||
<div className="relative flex h-screen w-full items-center justify-center">
|
||||
<LogoSpinner />
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue