From 8697136f0d8b93c2077cd736f37a84965aef59f0 Mon Sep 17 00:00:00 2001 From: mukeshs Date: Wed, 6 May 2026 14:14:59 +0530 Subject: [PATCH] Faculty update --- src/app/faculty/[id]/page.tsx | 10 ++++------ src/components/faculty/TeamListing.tsx | 12 +----------- src/components/faculty/TeamMemberDetail.tsx | 2 +- 3 files changed, 6 insertions(+), 18 deletions(-) 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) { <>