import "../css/lib/notification.css"; import React from "react"; import { Close, Notifications } from "@mui/icons-material"; import { Box, Snackbar } from "@mui/material"; import { useNotification } from "../components/ContextProvider"; /** * Display a notification at the top right corner */ export function Notification() { const [notification, setNotification] = useNotification(); const open = notification.open; return ( { setNotification({ ...notification, open: false }); }} onClose={() => { setNotification({ ...notification, open: false }); }} >

Notification

{notification.text}

); }