We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 30a5105 commit 32c9882Copy full SHA for 32c9882
src/app/proyectos/[id]/page.tsx
@@ -3,14 +3,20 @@ import { notFound } from "next/navigation";
3
import ProjectPage from "@/components/project-page";
4
import { projects } from "@/components/projects";
5
6
-export default function ProjectRoute({
+export default async function ProjectRoute({
7
params,
8
}: {
9
- params: { id: string };
+ params: Promise<{ id: string }>;
10
}) {
11
- const project = projects.find((p) => p.id === params.id);
+ // 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);
16
if (!project) {
17
return notFound();
18
}
19
20
+ // 3️⃣ Devolvemos la UI
21
return <ProjectPage project={project} />;
22
0 commit comments