import { getServerSession } from "next-auth/next" import { redirect } from "next/navigation" import Link from "next/link" import { prisma } from "@//app/lib/prisma" export default async function AdminDashboard() { const session = await getServerSession() if (!session) { redirect("/admin/login") } const agentsCount = await prisma.agent.count() const newsCount = await prisma.news.count() const categoriesCount = await prisma.category.count() return (
🤖

智能体总数

{agentsCount}

管理智能体 →
📰

新闻总数

{newsCount}

管理新闻 →
📂

分类总数

{categoriesCount}

管理分类 →

快捷操作

添加智能体 添加新闻 添加分类 查看前台
) }