diff --git a/frontend/src/components/pages/home/AnnouncementNotification.tsx b/frontend/src/components/pages/home/AnnouncementNotification.tsx index d254cd7..9ecdd90 100644 --- a/frontend/src/components/pages/home/AnnouncementNotification.tsx +++ b/frontend/src/components/pages/home/AnnouncementNotification.tsx @@ -3,6 +3,7 @@ import moment from "moment"; import { Box, Text, Flex, Icon, IconButton } from "@chakra-ui/react"; import PersonOutlineOutlinedIcon from "@mui/icons-material/PersonOutlineOutlined"; import ChevronRightIcon from "@mui/icons-material/ChevronRight"; +import ExpandMoreIcon from '@mui/icons-material/ExpandMore'; import ExpandLessIcon from "@mui/icons-material/ExpandLess"; import { Announcement } from "../../../types/NotificationTypes"; @@ -16,52 +17,59 @@ const AnnouncementNotification = ({ return ( - - - - - - - - {"Admin to Room ".concat(room)} - - - posted at {moment(createdAt).format("h:mm a")} - - - - {showFullMessage ? ( - {message} - ) : ( - - {message} - - )} + + + + + + + + {"Admin to Room ".concat(room)} + + + posted at {moment(createdAt).format("h:mm a")} + + + + {showFullMessage ? ( + + {message} + + ) : ( + + {message} + + )} + + + + + setShowFullMessage(!showFullMessage)} + icon={showFullMessage ? : } + size="md" + /> - setShowFullMessage(!showFullMessage)} - icon={showFullMessage ? : } - size="md" - /> ); diff --git a/frontend/src/components/pages/home/HomePage.tsx b/frontend/src/components/pages/home/HomePage.tsx index b5f54cf..2152baf 100644 --- a/frontend/src/components/pages/home/HomePage.tsx +++ b/frontend/src/components/pages/home/HomePage.tsx @@ -125,8 +125,8 @@ const HomePage = (): React.ReactElement => { - setViewAll(!viewAll)} cursor="pointer"> - {viewAll ? "View less" : "View all"} + setViewAll(!viewAll)} cursor="pointer" textDecoration="underline"> + {viewAll ? "Collapse All" : "View all"} {(viewAll ? announcements : recentAnnouncements).map(