adding redirect after waitlist success
This commit is contained in:
+2
-2
@@ -6,7 +6,7 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
"build": "vite build",
|
"build": "vite build",
|
||||||
"postbuild": "node ./scripts/postbuild.cjs",
|
"postbuild": "node ./scripts/postbuild.cjs",
|
||||||
"predeploy": "npm run build",
|
"predeploy": "npm run build",
|
||||||
"deploy": "gh-pages -d dist",
|
"deploy": "gh-pages -d dist",
|
||||||
"build:dev": "vite build --mode development",
|
"build:dev": "vite build --mode development",
|
||||||
@@ -83,4 +83,4 @@
|
|||||||
"vite": "^5.4.19",
|
"vite": "^5.4.19",
|
||||||
"gh-pages": "^5.0.0"
|
"gh-pages": "^5.0.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -28,6 +28,10 @@ const Waitlist: React.FC = () => {
|
|||||||
toast({ title: "Success", description: "You've been added to the waitlist." });
|
toast({ title: "Success", description: "You've been added to the waitlist." });
|
||||||
setName("");
|
setName("");
|
||||||
setEmail("");
|
setEmail("");
|
||||||
|
// redirect to home after 0.5 seconds
|
||||||
|
setTimeout(() => {
|
||||||
|
window.location.href = "/";
|
||||||
|
}, 500);
|
||||||
} catch (err: any) {
|
} catch (err: any) {
|
||||||
toast({ title: "Error", description: err?.message ?? String(err) });
|
toast({ title: "Error", description: err?.message ?? String(err) });
|
||||||
} finally {
|
} finally {
|
||||||
|
|||||||
Reference in New Issue
Block a user