diff --git a/client/src/components/notificationBell.tsx b/client/src/components/notificationBell.tsx index 064cfb6..b78416a 100644 --- a/client/src/components/notificationBell.tsx +++ b/client/src/components/notificationBell.tsx @@ -1,11 +1,16 @@ import NotificationsIcon from "@mui/icons-material/Notifications"; import { Badge, Tooltip } from "@mui/material"; +import { useNavigate } from "react-router-dom"; export default function NotificationBell() { + const navigate = useNavigate(); + const handleClick = () => { + navigate("/notifications"); + }; return ( - - - + + + ); diff --git a/client/src/routes/notification.tsx b/client/src/routes/notification.tsx index 9e98dfc..ab37f1d 100644 --- a/client/src/routes/notification.tsx +++ b/client/src/routes/notification.tsx @@ -1,3 +1,31 @@ -export default function Notification() { - return <>Notification; +import { useSelector } from "react-redux"; +import { selectUserInfo } from "../app/loginSlice"; +import { Box, List, ListItem, Paper } from "@mui/material"; + +export default function ANotification() { + const userInfo = useSelector(selectUserInfo); + + return ( + + + {userInfo.notifications.length === 0 ? ( + No notifications + ) : ( + userInfo.notifications.map((notification: any) => ( + + + {notification.message} + + + )) + )} + + + ); }