mirror of
https://github.com/fosrl/pangolin.git
synced 2026-03-03 17:26:38 +00:00
I18n auth (#23)
* New translation keys in en-US locale * New translation keys in de-DE locale * New translation keys in fr-FR locale * New translation keys in it-IT locale * New translation keys in pl-PL locale * New translation keys in pt-PT locale * New translation keys in tr-TR locale * Add translation keys in app/auth * Fix build --------- Co-authored-by: Lokowitz <marvinlokowitz@gmail.com>
This commit is contained in:
@@ -71,6 +71,8 @@ export default function SignupForm({
|
||||
}
|
||||
});
|
||||
|
||||
const t = useTranslations();
|
||||
|
||||
async function onSubmit(values: z.infer<typeof formSchema>) {
|
||||
const { email, password } = values;
|
||||
|
||||
@@ -113,15 +115,13 @@ export default function SignupForm({
|
||||
setLoading(false);
|
||||
}
|
||||
|
||||
const t = useTranslations();
|
||||
|
||||
return (
|
||||
<Card className="w-full max-w-md">
|
||||
<CardHeader>
|
||||
<div className="flex flex-row items-center justify-center">
|
||||
<Image
|
||||
src={`/logo/pangolin_orange.svg`}
|
||||
alt="Pangolin Logo"
|
||||
alt={t('pangolinLogoAlt')}
|
||||
width="100"
|
||||
height="100"
|
||||
/>
|
||||
|
||||
@@ -6,6 +6,7 @@ import { Mail } from "lucide-react";
|
||||
import Link from "next/link";
|
||||
import { redirect } from "next/navigation";
|
||||
import { cache } from "react";
|
||||
import { useTranslations } from "next-intl";
|
||||
|
||||
export const dynamic = "force-dynamic";
|
||||
|
||||
@@ -20,6 +21,8 @@ export default async function Page(props: {
|
||||
|
||||
const isInvite = searchParams?.redirect?.includes("/invite");
|
||||
|
||||
const t = useTranslations();
|
||||
|
||||
if (env.flags.disableSignupWithoutInvite && !isInvite) {
|
||||
redirect("/");
|
||||
}
|
||||
@@ -54,11 +57,10 @@ export default async function Page(props: {
|
||||
<div className="flex flex-col items-center">
|
||||
<Mail className="w-12 h-12 mb-4 text-primary" />
|
||||
<h2 className="text-2xl font-bold mb-2 text-center">
|
||||
Looks like you've been invited!
|
||||
{t('inviteAlready')}
|
||||
</h2>
|
||||
<p className="text-center">
|
||||
To accept the invite, you must log in or create an
|
||||
account.
|
||||
{t('inviteAlreadyDescription')}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -71,7 +73,7 @@ export default async function Page(props: {
|
||||
/>
|
||||
|
||||
<p className="text-center text-muted-foreground mt-4">
|
||||
Already have an account?{" "}
|
||||
{t('signupQuestion')}{" "}
|
||||
<Link
|
||||
href={
|
||||
!redirectUrl
|
||||
@@ -80,7 +82,7 @@ export default async function Page(props: {
|
||||
}
|
||||
className="underline"
|
||||
>
|
||||
Log in
|
||||
{t('login')}
|
||||
</Link>
|
||||
</p>
|
||||
</>
|
||||
|
||||
Reference in New Issue
Block a user