adding redirect after waitlist success

This commit is contained in:
itsamejms
2026-03-05 17:42:19 +00:00
parent 7a096c13e9
commit e253e1cbc5
2 changed files with 6 additions and 2 deletions
+2 -2
View File
@@ -6,7 +6,7 @@
"scripts": {
"dev": "vite",
"build": "vite build",
"postbuild": "node ./scripts/postbuild.cjs",
"postbuild": "node ./scripts/postbuild.cjs",
"predeploy": "npm run build",
"deploy": "gh-pages -d dist",
"build:dev": "vite build --mode development",
@@ -83,4 +83,4 @@
"vite": "^5.4.19",
"gh-pages": "^5.0.0"
}
}
}
+4
View File
@@ -28,6 +28,10 @@ const Waitlist: React.FC = () => {
toast({ title: "Success", description: "You've been added to the waitlist." });
setName("");
setEmail("");
// redirect to home after 0.5 seconds
setTimeout(() => {
window.location.href = "/";
}, 500);
} catch (err: any) {
toast({ title: "Error", description: err?.message ?? String(err) });
} finally {