33 lines
978 B
TypeScript
33 lines
978 B
TypeScript
import React from 'react'
|
|
import { cookies } from 'next/headers'
|
|
import RegisterForm from './RegisterForm'
|
|
import LanguageSelector from '@/components/LanguageSelector'
|
|
|
|
async function getMessages() {
|
|
const cookieStore = await cookies()
|
|
const lang = cookieStore.get('NEXT_LOCALE')?.value || 'de'
|
|
const messages = await import(`@/messages/${lang}.json`)
|
|
return messages.default
|
|
}
|
|
|
|
export default async function RegisterPage() {
|
|
const messages = await getMessages()
|
|
|
|
return (
|
|
<div className="min-h-screen flex items-center justify-center bg-gray-50 py-12 px-4 sm:px-6 lg:px-8">
|
|
<div className="max-w-md w-full space-y-8">
|
|
<div className="absolute top-4 right-4">
|
|
<LanguageSelector />
|
|
</div>
|
|
|
|
<div>
|
|
<h2 className="mt-6 text-center text-3xl font-extrabold text-gray-900">
|
|
{messages.register.title}
|
|
</h2>
|
|
</div>
|
|
|
|
<RegisterForm messages={messages} />
|
|
</div>
|
|
</div>
|
|
)
|
|
}
|