upgrade pnpm, Table auf Event seite

This commit is contained in:
PxlLoewe
2026-01-29 21:47:49 +01:00
parent 9129652912
commit e4fa011d96
5 changed files with 144 additions and 81 deletions

View File

@@ -11,6 +11,7 @@ export default async function Page({
params: Promise<{ id: string; participantId: string }>;
}) {
const { id: eventId, participantId } = await params;
console.log(eventId, participantId);
const event = await prisma.event.findUnique({
where: { id: parseInt(eventId) },
@@ -20,11 +21,15 @@ export default async function Page({
where: { id: parseInt(participantId) },
});
if (!participant) {
return <Error title="Teilnehmer nicht gefunden" statusCode={404} />;
}
const user = await prisma.user.findUnique({
where: { id: participant?.userId },
});
if (!event) return <div>Event nicht gefunden</div>;
if (!event) return <Error title="Event nicht gefunden" statusCode={404} />;
if (!participant || !user) {
return <Error title="Teilnehmer nicht gefunden" statusCode={404} />;