Thomas Fransolet d91cf7f02c Inscription self-service et quota IA exprimé en questions
- Parcours d'inscription /[lang]/signup.
- Quota IA : « req/mois » remplacé par « questions de visiteurs / mois » en
  4 langues — le backend compte des tokens, pas des requêtes, et la vitrine
  annonçait encore l'ancienne unité.
- .env.production suivi volontairement : il ne contient qu'une URL publique
  (préfixe NEXT_PUBLIC_), d'où l'exception dans .gitignore.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-11 10:48:54 +02:00

55 lines
2.0 KiB
TypeScript

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<Locale, { title: string; description: string }> = {
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<Metadata> {
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 <SignupClient lang={lang} />;
}