mirror of
https://github.com/Since-3/since3-portal.git
synced 2026-10-12 20:51:17 +00:00
26 lines
747 B
TypeScript
26 lines
747 B
TypeScript
import { notFound } from "next/navigation";
|
|
import { createAdminClient } from "@/lib/supabase/admin";
|
|
|
|
type Params = Promise<{ id: string }>;
|
|
|
|
const ClientDetailPage = async ({ params }: { params: Params }) => {
|
|
const { id } = await params;
|
|
const supabase = createAdminClient();
|
|
const { data: client } = await supabase
|
|
.from("profiles")
|
|
.select("id, name, email")
|
|
.eq("id", id)
|
|
.eq("role", "client")
|
|
.single();
|
|
|
|
if (!client) notFound();
|
|
|
|
return (
|
|
<div className="flex flex-col gap-2">
|
|
<h1 className="text-3xl font-semibold">{client.name}</h1>
|
|
<p className="text-muted-foreground">{client.email}</p>
|
|
</div>
|
|
)
|
|
}
|
|
|
|
export default ClientDetailPage
|