diff --git a/frontend/src/components/AnnouncementsDisplay.tsx b/frontend/src/components/AnnouncementsDisplay.tsx index 10ede13b..71b435ed 100644 --- a/frontend/src/components/AnnouncementsDisplay.tsx +++ b/frontend/src/components/AnnouncementsDisplay.tsx @@ -68,62 +68,66 @@ export function AnnouncementsDisplay() { void fetchAnnouncement(); } - if (!currentlyDisplayingAnnouncements) { + if (currentlyDisplayingAnnouncements.length === 0) { return null; } return ( - {currentlyDisplayingAnnouncements.map((announcement) => ( - hideAnnouncement(announcement.id)} /> - ))} + {currentlyDisplayingAnnouncements.map((announcement) => ( + hideAnnouncement(announcement.id)} + /> + ))} ); } -function Announcement({ announcement, onHide }: { announcement: Announcement, onHide: () => void }) { - // Severity is not implemented in the API currently +function Announcement({ announcement, onHide }: { announcement: Announcement; onHide: () => void }) { + // Severity is not implemented in the API currently const severity = SEVERITIES['Low']; return ( - -
- {announcement.title} - +
+ {announcement.title} + onHide()} + > + onHide()} - > - - -
- {announcement.text} - + /> +
+
+ {announcement.text} +
); -} \ No newline at end of file +}