Skip to content

Commit 56bb737

Browse files
committed
deploy
1 parent 1c31050 commit 56bb737

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

next.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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

2828
module.exports = nextConfig;

src/app/proyectos/[id]/page.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,21 @@ import { notFound } from "next/navigation";
33
import ProjectPage from "@/components/project-page";
44
import { 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}>
612
export 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
}

0 commit comments

Comments
 (0)