import { notFound } from "next/navigation"; import { db } from "@/db"; import { clients } from "@/db/schema"; import { eq } from "drizzle-orm"; import { updateClient } from "@/app/admin/clients/[id]/actions"; import { Input } from "@/components/ui/input"; import { Label } from "@/components/ui/label"; import { Button } from "@/components/ui/button"; import { Textarea } from "@/components/ui/textarea"; import Link from "next/link"; export default async function EditClientPage({ params, searchParams, }: { params: Promise<{ id: string }>; searchParams: Promise<{ error?: string }>; }) { const { id } = await params; const { error } = await searchParams; const [client] = await db.select().from(clients).where(eq(clients.id, id)).limit(1); if (!client) notFound(); return (