import React from 'react' import { motion, AnimatePresence } from 'framer-motion' import { useAlertState } from '../context/AlertContext' const icons: Record = { success: ( ), error: ( ), warning: ( ), info: ( ), } export default function AlertContainer() { const { alerts, removeAlert } = useAlertState() return (
{alerts.map(alert => ( {icons[alert.type]} {alert.message} ))}
) }