madiator.com/ui/component/snackBar/index.js

15 lines
391 B
JavaScript
Raw Normal View History

2021-08-16 12:11:25 +02:00
import { connect } from 'react-redux';
import { doDismissToast } from 'redux/actions/notifications';
import { selectToast } from 'redux/selectors/notifications';
import SnackBar from './view';
const perform = dispatch => ({
removeSnack: () => dispatch(doDismissToast()),
});
const select = state => ({
snack: selectToast(state),
});
export default connect(select, perform)(SnackBar);