import Alert from '@mui/material/Alert';

const AlertBox = ({flash}) => {
    return (
        <>
        {flash?.success && (
            <Alert severity="success" sx={{ mb: 2 }}>
                {flash.success}
            </Alert>
        )}
        {flash?.error && (
            <Alert severity="error" sx={{ mb: 2 }}>
                {flash.error}
            </Alert>
        )}
        </>
    )
}
export default AlertBox;