robust: ensure redirect to dashboard after onboarding with fallback

cgen-12e56a481591485a999986d7506b7ff8
This commit is contained in:
Builder.io 2025-09-28 04:59:41 +00:00
parent c322b37910
commit 6bff1bdd10

View file

@ -172,8 +172,13 @@ export default function Onboarding() {
description: "Profile setup complete. Welcome to your dashboard.",
});
// Navigate after success
// Navigate after success (with hard redirect fallback)
navigate("/dashboard", { replace: true });
setTimeout(() => {
if (location.pathname.includes("onboarding")) {
window.location.assign("/dashboard");
}
}, 400);
} catch (e) {
function formatError(err: any) {
if (!err) return "Unknown error";