import React from "react"; import { useDispatch, useSelector } from "react-redux"; import { notificationActions } from "../../store/notificationSlice"; import { motion, AnimatePresence } from "framer-motion"; function Notification() { const notifications = useSelector((state) => state.notificationReducer); const dispatch = useDispatch(); return (
{notifications.map(({ message, type, id }) => ( {message} dispatch(notificationActions.removeNotification(id)) } className="flex items-center justify-center w-[4.5rem] hover:bg-secondary-light-text" > ))}
); } export default Notification;