completed Implementation of User Event page

This commit is contained in:
PxlLoewe
2025-03-01 00:31:03 +01:00
parent 488c50e2e0
commit daf3238bee
6 changed files with 146 additions and 113 deletions

View File

@@ -1,6 +1,6 @@
import { getServerSession } from "../../api/auth/[...nextauth]/auth";
import { PrismaClient } from "@repo/db";
import { ObligatedEvent, KursItem } from "./_components/item";
import { KursItem } from "./_components/item";
import { RocketIcon } from "@radix-ui/react-icons";
export default async () => {
@@ -49,24 +49,14 @@ export default async () => {
</div>
{events.map((event) => {
if (event.type === "OBLIGATED_COURSE")
return (
<ObligatedEvent
selectedAppointments={userAppointments}
user={user}
event={event}
key={event.id}
/>
);
if (event.type === "COURSE")
return (
<KursItem
selectedAppointments={userAppointments}
user={user}
event={event}
key={event.id}
/>
);
return (
<KursItem
selectedAppointments={userAppointments}
user={user}
event={event}
key={event.id}
/>
);
})}
</div>
);