import { prisma } from "@repo/db"; import { getServerSession } from "../../api/auth/[...nextauth]/auth"; import { EventCard } from "./_components/EventCard"; import { RocketIcon } from "@radix-ui/react-icons"; const page = async () => { const session = await getServerSession(); if (!session) return null; const user = session.user; if (!user) return null; const events = await prisma.event.findMany({ orderBy: { id: "desc", }, where: { hidden: false, }, include: { Participants: { where: { userId: user.id, }, }, }, }); return (

Events & Kurse

{events.map((event) => { return ; })}
); }; export default page;