Refresh the shouldOnboard state in the Shell after onboarding (#1918)
Co-authored-by: Peer Richelsen <peeroke@gmail.com>
This commit is contained in:
parent
4d14809ecf
commit
8996c168ca
1 changed files with 3 additions and 3 deletions
|
@ -79,11 +79,11 @@ function useRedirectToOnboardingIfNeeded() {
|
|||
const user = query.data;
|
||||
|
||||
const [isRedirectingToOnboarding, setRedirecting] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
if (user && shouldShowOnboarding(user)) {
|
||||
setRedirecting(true);
|
||||
}
|
||||
user && setRedirecting(shouldShowOnboarding(user));
|
||||
}, [router, user]);
|
||||
|
||||
useEffect(() => {
|
||||
if (isRedirectingToOnboarding) {
|
||||
router.replace({
|
||||
|
|
Loading…
Reference in a new issue