diff --git a/frontend/src/components/AnnouncementsDisplay.tsx b/frontend/src/components/AnnouncementsDisplay.tsx index 04ce2fa1..4ba813de 100644 --- a/frontend/src/components/AnnouncementsDisplay.tsx +++ b/frontend/src/components/AnnouncementsDisplay.tsx @@ -29,7 +29,7 @@ const welcomeAnnouncement: Announcement = { }; export function AnnouncementsDisplay() { - const [announcements, setAnnouncements] = useState([]); + const [announcements, setAnnouncements] = useState([welcomeAnnouncement]); // showWelcome will display a welcome motd, the welcome motd has an id of "welcome" and once that is saved to hiddenMotdId, it will not show again const [hiddenAnnouncementIds, setHiddenAnnouncementIds] = useSetting('hiddenAnnouncementIds', []); @@ -54,11 +54,6 @@ export function AnnouncementsDisplay() { useEffect(() => { void fetchAnnouncement(); }, []); - useEffect(() => { - if (hiddenAnnouncementIds.length > 0) { - addAnnouncements([welcomeAnnouncement]); - } - }, [hiddenAnnouncementIds]); const currentlyDisplayingAnnouncement: Announcement | null = useMemo(() => { return announcements.find((announcement) => !hiddenAnnouncementIds.includes(announcement.id)) || null;