From 22188e237a90d1ba99e1603923d97f9496bed6e7 Mon Sep 17 00:00:00 2001 From: "Builder.io" Date: Mon, 10 Nov 2025 03:06:18 +0000 Subject: [PATCH] completionId: cgen-445d5a5c4f834a61b37a4b5f931ddf7d cgen-445d5a5c4f834a61b37a4b5f931ddf7d --- client/pages/Onboarding.tsx | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/client/pages/Onboarding.tsx b/client/pages/Onboarding.tsx index c6c16edb..514f896c 100644 --- a/client/pages/Onboarding.tsx +++ b/client/pages/Onboarding.tsx @@ -388,8 +388,11 @@ export default function Onboarding() { localStorage.removeItem(ONBOARDING_STORAGE_KEY); } catch {} - // Refresh profile so UI updates immediately - await refreshProfile(); + // Refresh profile in background (don't block on this) + // If it fails, the dashboard will handle showing stale data temporarily + refreshProfile().catch((err) => { + console.warn("Profile refresh failed after onboarding:", err); + }); // Success toast aethexToast.success({ @@ -397,15 +400,16 @@ export default function Onboarding() { description: "Profile setup complete. Welcome to your dashboard.", }); - // Navigate after success (with lightweight fallback) + // Navigate immediately (don't wait for profile refresh) navigate("/dashboard", { replace: true }); + // Ensure we navigate away even if React routing has issues if (typeof window !== "undefined") { setTimeout(() => { if (window.location.pathname.includes("onboarding")) { - navigate("/dashboard", { replace: true }); + window.location.href = "/dashboard"; } - }, 300); + }, 500); } } catch (e) { function formatError(err: any) {