import {PageParams} from "@/types/next"; import {prisma} from "@/prisma"; import {AgentCard} from "@/components/wrappers/dashboard/agent/AgentCard/AgentCard"; import {CardsWithPagination} from "@/components/wrappers/common/cards-with-pagination"; import {Button} from "@/components/ui/button"; import Link from 'next/link' import {Page, PageActions, PageContent, PageHeader, PageTitle} from "@/features/layout/page"; // import {db} from "@/db"; import {enhance} from "@zenstackhq/runtime"; import {currentUser} from "@/auth/current-user"; export default async function RoutePage(props: PageParams<{}>) { const user = await currentUser(); const db = enhance(prisma, {user: user}); const agents = await db.agent.findMany() console.log("aaaa", agents) return ( Agents {agents.length > 0 && ( )} {agents.length > 0 ? : Create new Agent } ) }