diff --git a/src/app/(dashboard)/dashboard/clients/page.tsx b/src/app/(dashboard)/dashboard/clients/page.tsx index 2567ffa..a66e670 100644 --- a/src/app/(dashboard)/dashboard/clients/page.tsx +++ b/src/app/(dashboard)/dashboard/clients/page.tsx @@ -1,5 +1,6 @@ import Link from "next/link"; import { redirect } from "next/navigation"; +import type { Prisma } from "@prisma/client"; import { getClientsByUserId } from "@/lib/dto/client"; import { getCurrentUser } from "@/lib/session"; @@ -15,6 +16,8 @@ import { import { AddClientButton } from "@/components/clients/add-client"; import { DeleteClientButton } from "@/components/clients/delete-client"; +type Client = Awaited>[number]; + // 创建 Prisma 客户端实例 async function fetchClients(userId: string) { return await getClientsByUserId(userId); @@ -50,7 +53,7 @@ export default async function ClientsPage() { - {clients.map((client) => ( + {clients.map((client: Client) => ( {client.name} diff --git a/src/app/layout.tsx b/src/app/layout.tsx index d372876..6ec9d04 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -1,15 +1,18 @@ import type { Metadata } from "next"; import { Inter } from "next/font/google"; +import Script from "next/script"; import "@/styles/globals.css"; +import { Toaster } from "@/components/ui/toaster"; + import { Providers } from "./providers"; const inter = Inter({ subsets: ["latin"] }); export const metadata: Metadata = { title: "Q58 Connect", - description: "Q58 Connect, 基于Q58论坛的OAuth 2.0认证服务", + description: "Q58论坛 OAuth 认证服务", }; export default function RootLayout({ @@ -18,9 +21,20 @@ export default function RootLayout({ children: React.ReactNode; }>) { return ( - + + +