Skip to content

Commit 32c9882

Browse files
committed
deploy
1 parent 30a5105 commit 32c9882

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

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

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,20 @@ import { notFound } from "next/navigation";
33
import ProjectPage from "@/components/project-page";
44
import { projects } from "@/components/projects";
55

6-
export default function ProjectRoute({
6+
export default async function ProjectRoute({
77
params,
88
}: {
9-
params: { id: string };
9+
params: Promise<{ id: string }>;
1010
}) {
11-
const project = projects.find((p) => p.id === params.id);
11+
// 1️⃣ Esperamos a que Next.js resuelva los params
12+
const { id } = await params;
13+
14+
// 2️⃣ Buscamos el proyecto
15+
const project = projects.find((p) => p.id === id);
1216
if (!project) {
1317
return notFound();
1418
}
19+
20+
// 3️⃣ Devolvemos la UI
1521
return <ProjectPage project={project} />;
1622
}

0 commit comments

Comments
 (0)