diff --git a/src/app/faculty/[id]/page.tsx b/src/app/faculty/[id]/page.tsx index 17b52a7..bfab023 100644 --- a/src/app/faculty/[id]/page.tsx +++ b/src/app/faculty/[id]/page.tsx @@ -18,18 +18,16 @@ type PageProps = { }; export default async function FacultyPage({ params }: PageProps) { - const { id } = await params; // ← Must await before accessing - const memberId = Number(id); + const { id } = await params; - // Guard against invalid IDs - if (!Number.isInteger(memberId)) { + if (!id) { notFound(); } let memberData; try { - memberData = await FacultyService.getFacultyById(memberId); + memberData = await FacultyService.getFacultyById(id); // pass string, not Number } catch (err) { console.error("Error loading faculty member:", err); notFound(); @@ -43,7 +41,7 @@ export default async function FacultyPage({ params }: PageProps) { <>