sign up redirect white screen fix

This commit is contained in:
bflatastic committed 2024-09-02 21:03:45 +07:00
1 parent 925e3898fe
commit fc58f4f09e
1 file changed
+8 -3
@@ -265,9 +265,14 @@ function SignupPage(props: Props) {
const redirectSignUpLink = "/welcome";
if (redirectLink) {
const url = new URL(redirectLink);
url.searchParams.set("from", "signup");
redirectLink = url.toString();
try {
const url = new URL(redirectLink);
url.searchParams.set("from", "signup");
redirectLink = url.toString();
} catch (error) {
console.error("Invalid redirect URL:", redirectLink);
redirectLink = null;
}
}
const afterSignupRedirect = async () => {