diff --git a/app/[locale]/login/page.tsx b/app/[locale]/login/page.tsx index 51b2ac1..411aa68 100644 --- a/app/[locale]/login/page.tsx +++ b/app/[locale]/login/page.tsx @@ -1,4 +1,3 @@ -import { useTranslation } from 'react-i18next' import { Brand } from "@/components/ui/brand" import { Input } from "@/components/ui/input" import { Label } from "@/components/ui/label" @@ -20,8 +19,6 @@ export default async function Login({ }: { searchParams: { message: string } }) { - const { t } = useTranslation() - const cookieStore = cookies() const supabase = createServerClient( process.env.NEXT_PUBLIC_SUPABASE_URL!, @@ -78,7 +75,7 @@ export default async function Login({ if (!homeWorkspace) { throw new Error( - homeWorkspaceError?.message || t('login.errorUnexpected') + homeWorkspaceError?.message || "An unexpected error occurred" ) } @@ -119,7 +116,7 @@ export default async function Login({ const emailMatch = emailWhitelist?.includes(email) if (!domainMatch && !emailMatch) { return redirect( - `/login?message=${t('login.emailNotAllowed', { email })}` + `/login?message=Email ${email} is not allowed to sign up.` ) } } @@ -141,10 +138,10 @@ export default async function Login({ return redirect(`/login?message=${error.message}`) } + return redirect("/setup") + // USE IF YOU WANT TO SEND EMAIL VERIFICATION, ALSO CHANGE TOML FILE // return redirect("/login?message=Check email to continue sign in process") - - return redirect("/setup") } const handleResetPassword = async (formData: FormData) => { @@ -163,7 +160,7 @@ export default async function Login({ return redirect(`/login?message=${error.message}`) } - return redirect("/login?message=" + t('login.passwordResetMessage')) + return redirect("/login?message=Check email to reset password") } return ( @@ -175,43 +172,43 @@ export default async function Login({ - {t('login.loginButton')} + Login - {t('login.signUpButton')} + Sign Up
- {t('login.forgotPassword')} + Forgot your password?