import { useState, useEffect, forwardRef } from 'react'; import { Snackbar, Alert } from '@mui/material'; import styles from './styles'; function SnackbarIndicator({ isOpen, severity, message }) { const [open, setOpen] = useState(false); const { snackbarContainer, customAlert } = styles; useEffect(() => { setOpen(isOpen); }, [isOpen]); const onClose = reason => { if (reason !== 'clickaway') { setOpen(false); } }; return ( {message} ); } const CustomAlert = forwardRef(function MuiAlert(props, ref) { return ; }); export default SnackbarIndicator;