diff --git a/src/admin/components/AlertContainer.tsx b/src/admin/components/AlertContainer.tsx index fc1ea11..a4dc50b 100644 --- a/src/admin/components/AlertContainer.tsx +++ b/src/admin/components/AlertContainer.tsx @@ -1,102 +1,29 @@ -import React from "react"; -import { motion, AnimatePresence } from "framer-motion"; +import Snackbar from "@mui/material/Snackbar"; +import MuiAlert from "@mui/material/Alert"; import { useAlertState } from "../context/AlertContext"; -const icons: Record = { - success: ( - - - - - ), - error: ( - - - - - - ), - warning: ( - - - - - - ), - info: ( - - - - - - ), -}; - export default function AlertContainer() { const { alerts, removeAlert } = useAlertState(); return ( -
- - {alerts.map((alert) => ( - + {alerts.map((alert, index) => ( + + removeAlert(alert.id)} + variant="filled" + sx={{ width: "100%", minWidth: 280 }} > - {icons[alert.type]} - {alert.message} - - - ))} - -
+ {alert.message} + + + ))} + ); }