import type { Metadata } from 'next'; import { notFound } from 'next/navigation'; import { LOCALES, LOCALE_HTML_LANG, DEFAULT_LOCALE, isLocale, type Locale } from '@/i18n'; import SignupClient from './SignupClient'; const META_BY_LOCALE: Record = { fr: { title: 'Créer mon compte — Plan Essentiel | MyInfoMate', description: "Démarrez votre essai gratuit de 14 jours sur MyInfoMate, sans carte bancaire. Votre app visiteur web en quelques minutes.", }, en: { title: 'Create my account — Essentiel plan | MyInfoMate', description: 'Start your 14-day free trial on MyInfoMate, no card required. Your web visitor app in minutes.', }, nl: { title: 'Mijn account aanmaken — Plan Essentieel | MyInfoMate', description: 'Start uw gratis proefperiode van 14 dagen op MyInfoMate, zonder kredietkaart. Uw webbezoekersapp in enkele minuten.', }, de: { title: 'Konto erstellen — Essentiel-Plan | MyInfoMate', description: 'Starten Sie Ihre 14-tägige kostenlose Testphase bei MyInfoMate, ohne Kreditkarte. Ihre Web-Besucher-App in wenigen Minuten.', }, }; export function generateStaticParams() { return LOCALES.map((lang) => ({ lang })); } export async function generateMetadata({ params, }: { params: Promise<{ lang: string }>; }): Promise { const { lang } = await params; if (!isLocale(lang)) return {}; const m = META_BY_LOCALE[lang]; const languages = Object.fromEntries(LOCALES.map((l) => [LOCALE_HTML_LANG[l], `/${l}/signup`])); return { title: m.title, description: m.description, robots: { index: false, follow: true }, alternates: { canonical: `/${lang}/signup`, languages: { ...languages, 'x-default': `/${DEFAULT_LOCALE}/signup` }, }, }; } export default async function SignupPage({ params }: { params: Promise<{ lang: string }> }) { const { lang } = await params; if (!isLocale(lang)) notFound(); return ; }