import React from 'react'; import { connect } from 'react-redux'; import Alert from '@material-ui/lab/Alert'; import { selectAlertState } from '../reducers/alert/selector'; import { alertCancel } from '../reducers/alert/service'; import { bindActionCreators, Dispatch } from 'redux'; import Box from '@material-ui/core/Box'; // @ts-ignore import styles from './Common.module.scss'; interface Props { alert: any; alertCancel: typeof alertCancel; } const mapStateToProps = (state: any): any => { return { alert: selectAlertState(state) }; }; const mapDispatchToProps = (dispatch: Dispatch): any => ({ alertCancel: bindActionCreators(alertCancel, dispatch) }); const AlertsComponent = (props: Props): any => { const { alert, alertCancel } = props; const handleClose = (e: any): void => { e.preventDefault(); alertCancel(); }; const type = alert.get('type'); const message = alert.get('message'); return (