Refresh the shouldOnboard state in the Shell after onboarding (#1918)
Co-authored-by: Peer Richelsen <[email protected]>
This commit is contained in:
1 parent
4d14809ecf
commit
8996c168ca
1 file changed
+3
-3
@@ -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({
|
||||
|
||||
Reference in new issue
Block a user