From 974a5fc071eed46b03e14acb5e3313010c03d81c Mon Sep 17 00:00:00 2001 From: eugbyte Date: Wed, 8 Oct 2025 20:50:45 +0800 Subject: [PATCH 1/2] fix: registration --- .../routes/gatherings/$gatheringId/index.tsx | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/evently.client/src/routes/gatherings/$gatheringId/index.tsx b/src/evently.client/src/routes/gatherings/$gatheringId/index.tsx index 9b7e4c7..8a2e137 100644 --- a/src/evently.client/src/routes/gatherings/$gatheringId/index.tsx +++ b/src/evently.client/src/routes/gatherings/$gatheringId/index.tsx @@ -20,14 +20,19 @@ export const Route = createFileRoute("/gatherings/$gatheringId/")({ const accountId: string | undefined = context.account?.id; const gatheringId: number = parseInt(params.gatheringId); const gathering: Gathering | null = await getGathering(gatheringId); - const { data: bookings } = await getBookings({ - attendeeId: accountId ?? "", - gatheringId, - isCancelled: false - }); + let booking: Booking | null = null; + if (accountId != null && accountId.trim().length > 0) { + const { data: bookings } = await getBookings({ + attendeeId: accountId ?? "-1", + gatheringId, + isCancelled: false + }); + booking = bookings.length > 0 ? bookings[0] : null; + } + return { gathering, - booking: bookings.length > 0 ? bookings[0] : null + booking }; }, component: GatheringPage, From ce1b3179b2a436786a6fe77a4ed829ee8749ea64 Mon Sep 17 00:00:00 2001 From: eugbyte Date: Wed, 8 Oct 2025 21:20:48 +0800 Subject: [PATCH 2/2] fix: registration --- src/evently.client/src/routes/gatherings/$gatheringId/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/evently.client/src/routes/gatherings/$gatheringId/index.tsx b/src/evently.client/src/routes/gatherings/$gatheringId/index.tsx index 8a2e137..0fa79c1 100644 --- a/src/evently.client/src/routes/gatherings/$gatheringId/index.tsx +++ b/src/evently.client/src/routes/gatherings/$gatheringId/index.tsx @@ -23,7 +23,7 @@ export const Route = createFileRoute("/gatherings/$gatheringId/")({ let booking: Booking | null = null; if (accountId != null && accountId.trim().length > 0) { const { data: bookings } = await getBookings({ - attendeeId: accountId ?? "-1", + attendeeId: accountId, gatheringId, isCancelled: false });