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

30 lines
604 B
TypeScript

import { notFound } from 'next/navigation';
import { getProjectById } from '@/lib/projectsService';
import ProjectDetail from '@/components/dashboard/project-detail';
interface PageProps {
params: {
id: string;
};
}
/**
* Página de detalle de proyecto
* Ruta dinámica: /proyectos/[id]
*/
export default async function ProjectDetailPage({ params }: PageProps) {
const projectId = parseInt(params.id);
if (isNaN(projectId)) {
notFound();
}
const project = await getProjectById(projectId);
if (!project) {
notFound();
}
return <ProjectDetail project={project} />;
}