Skip to content

Commit

Permalink
Updating URL
Browse files Browse the repository at this point in the history
  • Loading branch information
iamhectorsosa committed Feb 14, 2024
1 parent f584352 commit a245b5d
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions playground/app/register/RegisterForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,7 @@ const FormSchema = z.object({
});

const getURL = () => {
const base =
process?.env?.NEXT_PUBLIC_SITE_URL ??
process?.env?.NEXT_PUBLIC_VERCEL_URL ??
"http://localhost:3000";
const base = process?.env?.NEXT_PUBLIC_VERCEL_URL ?? "http://localhost:3000";
return `${base.startsWith("http") ? base : `https://${base}`}/`.replace(
/\/+$/,
"/"
Expand Down Expand Up @@ -113,7 +110,7 @@ const RegisterFormComponent: React.FC<{
onSubmit({
email,
password,
options: { emailRedirectTo: getURL + SETTINGS_PROFILE_URL },
options: { emailRedirectTo: getURL() + SETTINGS_PROFILE_URL },
});
})}
className="space-y-6"
Expand Down

0 comments on commit a245b5d

Please sign in to comment.