import { notFound } from 'next/navigation'; import { ChevronLeft } from 'lucide-react'; import Link from 'next/link'; import { getClient } from '../actions'; import { transformClient } from '@/lib/types/client'; import { ClientTabs } from './components/client-tabs'; interface ClientDetailPageProps { params: Promise<{ id: string }>; searchParams: Promise<{ tab?: string }>; } export default async function ClientDetailPage({ params, searchParams, }: ClientDetailPageProps) { const { id } = await params; const { tab } = await searchParams; // Fetch client data let client; try { client = await getClient(id); } catch (error) { notFound(); } if (!client) { notFound(); } const clientWithAge = transformClient(client); return (