Fix error messages on sign up (#10399)
In this PR: - adding logs to track workspace creation performance - refactor useIsWorkspaceSuspended to be more generic - only fetch favorites and views if workspace is Active to avoid error messages on sign up (workspace is not created yet)
This commit is contained in:
@ -1,9 +1,11 @@
|
||||
import { useRecoilValue } from 'recoil';
|
||||
|
||||
import { useIsLogged } from '@/auth/hooks/useIsLogged';
|
||||
import { currentUserState } from '@/auth/states/currentUserState';
|
||||
import { OnboardingStatus } from '~/generated/graphql';
|
||||
|
||||
export const useOnboardingStatus = (): OnboardingStatus | null | undefined => {
|
||||
const currentUser = useRecoilValue(currentUserState);
|
||||
return currentUser?.onboardingStatus;
|
||||
const isLoggedIn = useIsLogged();
|
||||
return isLoggedIn ? currentUser?.onboardingStatus : undefined;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user