Redirect signups to the homepage (#196)

This commit is contained in:
Ben Senescu 2026-05-14 08:17:44 -04:00 committed by GitHub
parent 46631e68e9
commit 0ce787889a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -76,7 +76,9 @@ function SignUpPage() {
password: value.password, password: value.password,
callbackURL: (() => { callbackURL: (() => {
const url = new URL("/verify-email", window.location.origin); const url = new URL("/verify-email", window.location.origin);
url.searchParams.set("redirect", "/subscribe"); if (redirectTo !== "/") {
url.searchParams.set("redirect", redirectTo);
}
return url.toString(); return url.toString();
})(), })(),
}); });
@ -110,7 +112,7 @@ function SignUpPage() {
}); });
async function handleContinueWithGoogle() { async function handleContinueWithGoogle() {
const callbackURL = redirectTo === "/" ? "/subscribe" : redirectTo; const callbackURL = redirectTo;
setSocialError(null); setSocialError(null);
setIsStartingGoogle(true); setIsStartingGoogle(true);