From b8adf165e570eb5eb07c5898bc9a95e30836279e Mon Sep 17 00:00:00 2001
From: Beebles <102569435+beebls@users.noreply.github.com>
Date: Fri, 13 Sep 2024 18:34:09 -0600
Subject: move welcome announcement to default

---
 frontend/src/components/AnnouncementsDisplay.tsx | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

(limited to 'frontend/src/components/AnnouncementsDisplay.tsx')

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<Announcement[]>([]);
+  const [announcements, setAnnouncements] = useState<Announcement[]>([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<string[]>('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;
-- 
cgit v1.2.3

