import { prisma } from "@/lib/prisma"; import { Button } from "@/components/ui/button"; import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow, } from "@/components/ui/table"; import { AddClientButton } from "@/components/clients/add-client"; // 创建 Prisma 客户端实例 async function fetchClients() { return await prisma.client.findMany({ select: { id: true, name: true, clientId: true, redirectUri: true, user: { select: { name: true, email: true, }, }, }, }); } export default async function ClientsPage() { const clients = await fetchClients(); return (