33 lines
941 B
TypeScript
33 lines
941 B
TypeScript
import { getTranslations } from "next-intl/server";
|
|
import { siteSettings } from "@/lib/services/site-settings";
|
|
import { RegisterForm } from "@/components/auth/register-form";
|
|
import { captchaConfig } from "@/lib/services/captcha";
|
|
|
|
export const revalidate = 300;
|
|
|
|
export default async function RegisterPage({
|
|
searchParams,
|
|
}: {
|
|
searchParams: Promise<{ error?: string }>;
|
|
}) {
|
|
const t = await getTranslations("pages.register");
|
|
const { error } = await searchParams;
|
|
|
|
const [hotelName, captcha] = await Promise.all([
|
|
siteSettings.get("hotel_name", "Atom"),
|
|
captchaConfig(),
|
|
]);
|
|
|
|
return (
|
|
<main className="flex min-h-[calc(100vh-200px)] items-center justify-center px-4 py-8">
|
|
<div className="w-full">
|
|
<h1 className="sr-only">{t("title")}</h1>
|
|
<RegisterForm
|
|
hotelName={hotelName ?? "Atom"}
|
|
captcha={captcha}
|
|
error={error}
|
|
/>
|
|
</div>
|
|
</main>
|
|
);
|
|
} |