diff --git a/frontend/src/components/EventAdmin.tsx b/frontend/src/components/EventAdmin.tsx index 5aa77d4..18dc030 100644 --- a/frontend/src/components/EventAdmin.tsx +++ b/frontend/src/components/EventAdmin.tsx @@ -945,9 +945,9 @@ const EventAdmin: React.FC = () => { {rsvp.bringing_guests === 'yes' ? `${rsvp.guest_count || 0} (${Array.isArray(rsvp.guest_names) ? - rsvp.guest_names.join(', ') : + rsvp.guest_names.map(name => name.trim()).join(', ') : typeof rsvp.guest_names === 'string' ? - rsvp.guest_names.replace(/\s+/g, ', ') : + rsvp.guest_names.replace(/\s+/g, ', ').trim() : 'No names provided'})` : 'No' } diff --git a/frontend/src/components/EventView.tsx b/frontend/src/components/EventView.tsx index 248af5f..4796cb8 100644 --- a/frontend/src/components/EventView.tsx +++ b/frontend/src/components/EventView.tsx @@ -293,9 +293,9 @@ const EventView: React.FC = () => { {rsvp.bringing_guests === 'yes' ? `${rsvp.guest_count} (${Array.isArray(rsvp.guest_names) ? - rsvp.guest_names.join(', ') : + rsvp.guest_names.map(name => name.trim()).join(', ') : typeof rsvp.guest_names === 'string' ? - rsvp.guest_names.replace(/\s+/g, ', ') : + rsvp.guest_names.replace(/\s+/g, ', ').trim() : 'No names provided'})` : 'No' }