You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
503 B

  1. import { connect } from 'react-redux';
  2. import { NotificationStack } from 'react-notification';
  3. import { dismissAlert } from 'flavours/glitch/actions/alerts';
  4. import { getAlerts } from 'flavours/glitch/selectors';
  5. const mapStateToProps = state => ({
  6. notifications: getAlerts(state),
  7. });
  8. const mapDispatchToProps = (dispatch) => {
  9. return {
  10. onDismiss: alert => {
  11. dispatch(dismissAlert(alert));
  12. },
  13. };
  14. };
  15. export default connect(mapStateToProps, mapDispatchToProps)(NotificationStack);