diff --git a/web-next/app/[locale]/[...rest]/page.tsx b/web-next/app/[locale]/[...rest]/page.tsx new file mode 100644 index 0000000..b8aff18 --- /dev/null +++ b/web-next/app/[locale]/[...rest]/page.tsx @@ -0,0 +1,9 @@ +import { notFound } from 'next/navigation' + +/** + * Catch-all de rutas inexistentes bajo un idioma: dispara notFound() para que + * se renderice la 404 temática (`[locale]/not-found.tsx`) dentro del layout. + */ +export default function CatchAllNotFound() { + notFound() +} diff --git a/web-next/app/[locale]/not-found.tsx b/web-next/app/[locale]/not-found.tsx new file mode 100644 index 0000000..8916a1a --- /dev/null +++ b/web-next/app/[locale]/not-found.tsx @@ -0,0 +1,26 @@ +import { getTranslations } from 'next-intl/server' + +/** + * 404 temática (dentro del layout de [locale] → cabecera/vídeo/pie + tema). + * Se muestra cuando se llama a notFound() dentro de un segmento de idioma, + * incluido el catch-all `[...rest]` para rutas inexistentes. + */ +export default async function NotFound() { + const t = await getTranslations('NotFound') + return ( +
{t('message')}
+