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

15 lines
391 B
JavaScript
Raw Normal View History

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