completed Implementation of User Event page
This commit is contained in:
@@ -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>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user