robust: ensure redirect to dashboard after onboarding with fallback
cgen-12e56a481591485a999986d7506b7ff8
This commit is contained in:
parent
c322b37910
commit
6bff1bdd10
1 changed files with 6 additions and 1 deletions
|
|
@ -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";
|
||||
|
|
|
|||
Loading…
Reference in a new issue