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