Skip to content

Scheduling infrastructure for absolutely everyone.

Refresh the shouldOnboard state in the Shell after onboarding (#1918)

Demian Caldelas8996c168cabc
diff --git a/apps/web/components/Shell.tsx b/apps/web/components/Shell.tsx
index 9d6b211e89b..09400a850dc 100644
--- a/apps/web/components/Shell.tsx
+++ b/apps/web/components/Shell.tsx
@@ -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({