File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed
Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ const nextConfig = {
2222 //swcMinify: true,
2323
2424 // Nota: hemos eliminado `output: 'export'` para poder usar i18n
25- output : 'standalone '
25+ output : 'export '
2626} ;
2727
2828module . exports = nextConfig ;
Original file line number Diff line number Diff line change @@ -3,21 +3,21 @@ import { notFound } from "next/navigation";
33import ProjectPage from "@/components/project-page" ;
44import { projects } from "@/components/projects" ;
55
6+ // ① Le dices a Next qué ids pre-renderizar
7+ export async function generateStaticParams ( ) {
8+ return projects . map ( ( p ) => ( { id : p . id } ) ) ;
9+ }
10+
11+ // ② Idéntica firma asíncrona con params: Promise<{id:string}>
612export default async function ProjectRoute ( {
713 params,
814} : {
9- // Next.js 15 ya siempre te pasa params como Promise
1015 params : Promise < { id : string } > ;
1116} ) {
12- // 1️⃣ await params para obtener el id
1317 const { id } = await params ;
14-
15- // 2️⃣ buscas tu proyecto
1618 const project = projects . find ( ( p ) => p . id === id ) ;
1719 if ( ! project ) {
1820 return notFound ( ) ;
1921 }
20-
21- // 3️⃣ devuelves tu componente
2222 return < ProjectPage project = { project } /> ;
2323}
You can’t perform that action at this time.
0 commit comments