diff --git a/frontend/src/components/pages/announcements/AnnouncementsView.tsx b/frontend/src/components/pages/announcements/AnnouncementsView.tsx index e9fdd16..d0f9c7f 100644 --- a/frontend/src/components/pages/announcements/AnnouncementsView.tsx +++ b/frontend/src/components/pages/announcements/AnnouncementsView.tsx @@ -181,27 +181,34 @@ const AnnouncementsView = ({ border="1px solid #57469D" backgroundColor="#F9F7FF" > - Room {room} + {room === -1? 'All Rooms': `Room ${room}`} deleteRoomSelected(room)} color="#57469D" /> ))} - - - - - - {allRooms - .filter((room) => !selectedRooms.includes(room)) - .map((room) => ( - addRoomToNewRoom(room)} key={room}> - Room {room} - - ))} - - + {selectedRooms.length === 0 && + + + + + + {[ + addRoomToNewRoom(-1)} key='all-rooms'> + All Rooms + , + ...allRooms + .filter((room) => !selectedRooms.includes(room)) + .map((room) => ( + addRoomToNewRoom(room)} key={room}> + Room {room} + + )) + ]} + + + } );