[#500] fixed attendee count in preview (#509)

This commit is contained in:
Camille Moussu
2026-02-05 11:07:53 +01:00
committed by GitHub
parent 7c45d47634
commit 1d6a597c46
+2 -6
View File
@@ -265,10 +265,6 @@ export default function EventPreviewModal({
(a) => a.cal_address !== event.organizer?.cal_address (a) => a.cal_address !== event.organizer?.cal_address
) || []; ) || [];
const visibleAttendees = showAllAttendees
? attendees
: attendees.slice(0, attendeeDisplayLimit);
const currentUserAttendee = event.attendee?.find( const currentUserAttendee = event.attendee?.find(
(person) => person.cal_address === user.email (person) => person.cal_address === user.email
); );
@@ -550,7 +546,7 @@ export default function EventPreviewModal({
showAllAttendees, showAllAttendees,
true true
)} )}
{visibleAttendees.map((a, idx) => {attendees.map((a, idx) =>
renderAttendeeBadge( renderAttendeeBadge(
a, a,
idx.toString(), idx.toString(),
@@ -583,7 +579,7 @@ export default function EventPreviewModal({
organizer && organizer &&
renderAttendeeBadge(organizer, "org", t, showAllAttendees, true)} renderAttendeeBadge(organizer, "org", t, showAllAttendees, true)}
{showAllAttendees && {showAllAttendees &&
visibleAttendees.map((a, idx) => attendees.map((a, idx) =>
renderAttendeeBadge(a, idx.toString(), t, showAllAttendees) renderAttendeeBadge(a, idx.toString(), t, showAllAttendees)
)} )}
{/* Location */} {/* Location */}