闭社主体 forked from https://github.com/tootsuite/mastodon
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
489 B

  1. import { connect } from 'react-redux';
  2. import { NotificationStack } from 'react-notification';
  3. import { dismissAlert } from '../../../actions/alerts';
  4. import { getAlerts } from '../../../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);