From 054e6bac997740a24c029b3394003edb8d506284 Mon Sep 17 00:00:00 2001 From: mukeshs Date: Thu, 9 Oct 2025 22:45:22 +0530 Subject: [PATCH] build error fixes --- src/app/faculty/[id]/page.tsx | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/app/faculty/[id]/page.tsx b/src/app/faculty/[id]/page.tsx index 158ddfd..efabe16 100644 --- a/src/app/faculty/[id]/page.tsx +++ b/src/app/faculty/[id]/page.tsx @@ -9,9 +9,10 @@ import type { Metadata } from 'next'; export default async function FacultyPage({ params, }: { - params: { id: string }; + params: Promise<{ id: string }>; }) { - const memberId = parseInt(params.id); + const { id } = await params; + const memberId = parseInt(id); if (isNaN(memberId)) { notFound(); @@ -50,9 +51,10 @@ export async function generateStaticParams() { export async function generateMetadata({ params, }: { - params: { id: string }; + params: Promise<{ id: string }>; }): Promise { - const memberId = parseInt(params.id); + const { id } = await params; + const memberId = parseInt(id); if (isNaN(memberId)) { return { title: 'Faculty Member Not Found - CMC Vellore' }; @@ -78,4 +80,4 @@ export async function generateMetadata({ console.error('Error generating metadata:', error); return { title: 'Faculty Member - CMC Vellore' }; } -} +} \ No newline at end of file