diff --git a/frontend/src/components/EventDetails.tsx b/frontend/src/components/EventDetails.tsx
index be2edaf..c50ebbf 100644
--- a/frontend/src/components/EventDetails.tsx
+++ b/frontend/src/components/EventDetails.tsx
@@ -33,17 +33,25 @@ const EventDetails: React.FC = () => {
if (loading) {
return (
-
-
-
-
-
+
+
+
);
}
if (error) {
return (
-
+
{error}
);
@@ -51,129 +59,157 @@ const EventDetails: React.FC = () => {
if (!event) {
return (
-
+
Event not found
);
}
+ const formatStatus = (status: string) => {
+ switch (status.toLowerCase()) {
+ case 'attending':
+ return 'Yes';
+ case 'not_attending':
+ return 'No';
+ case 'maybe':
+ return 'Maybe';
+ default:
+ return status.charAt(0).toUpperCase() + status.slice(1);
+ }
+ };
+
return (
-
-
-
+
+
- {event.title}
-
-
- {event.date} at {event.location}
+ {event.title}
+
+
+
+ {event.date} at {event.location}
+
+
+
+ {event.description}
-
-
- {event.description}
-
-
- RSVPs
-
-
- {rsvps.map((rsvp) => (
-
+ RSVPs
+
+
+ {rsvps.map((rsvp) => (
+
+
+ {rsvp.name}
+
+ }
+ secondary={
+
+ {rsvp.email} - {formatStatus(rsvp.status)}
+
+ }
+ />
+
+ ))}
+
+
+
+
- ))}
-
-
-
-
-
-
-
+ Back to Events
+
+
+
+
+
);
};