import { localizedMetadata } from "@/lib/i18n/serverMetadata";
import type { Metadata } from "next";

import EmailVerificationRoute from "@/features/auth/components/EmailVerificationRoute";

/*
 * Title only; `robots: noindex` comes from `(auth)/layout.tsx` and the rest
 * from the root layout. Previously a Client Component — which cannot export
 * `metadata` — because it read `useSearchParams`; that now lives in
 * `EmailVerificationRoute`, unchanged.
 */
const pageMetadata: Metadata = {
  title: "Verify your email",
};

export async function generateMetadata(): Promise<Metadata> {
  return localizedMetadata(pageMetadata);
}

export default function EmailVerificationPage() {
  return <EmailVerificationRoute />;
}
