lbry-desktop/ui/component/snackBar/index.js

16 lines
452 B
JavaScript
Raw Normal View History

import { connect } from 'react-redux';
import { doDismissToast } from 'redux/actions/notifications';
import { selectToast, selectToastCount } from 'redux/selectors/notifications';
import SnackBar from './view';
2017-05-23 09:21:21 +02:00
const perform = (dispatch) => ({
removeSnack: () => dispatch(doDismissToast()),
2017-06-06 06:21:55 +02:00
});
2017-05-23 09:21:21 +02:00
const select = (state) => ({
snack: selectToast(state),
snackCount: selectToastCount(state),
2017-06-06 06:21:55 +02:00
});
2017-05-23 09:21:21 +02:00
export default connect(select, perform)(SnackBar);