feat(i18n): add language switcher
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { redirect } from "next/navigation"
|
||||
|
||||
import { LanguageSwitcher } from "@/components/i18n/language-switcher"
|
||||
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"
|
||||
import { getI18n } from "@/i18n/server"
|
||||
import { auth } from "@/lib/auth"
|
||||
@@ -11,12 +12,18 @@ export default async function LoginPage() {
|
||||
|
||||
if (session) redirect("/")
|
||||
|
||||
const { dictionary } = await getI18n()
|
||||
const { dictionary, locale } = await getI18n()
|
||||
const copy = dictionary.login
|
||||
|
||||
return (
|
||||
<div className="flex min-h-svh w-full items-center justify-center p-6 md:p-10">
|
||||
<div className="w-full max-w-sm">
|
||||
<div className="w-full max-w-sm space-y-3">
|
||||
<div className="flex justify-end">
|
||||
<LanguageSwitcher
|
||||
activeLocale={locale}
|
||||
copy={dictionary.common.languageSwitcher}
|
||||
/>
|
||||
</div>
|
||||
<Card>
|
||||
<CardHeader>
|
||||
<CardTitle>
|
||||
|
||||
Reference in New Issue
Block a user