闭社主体 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.

21 lines
613 B

  1. import { connect } from 'react-redux';
  2. import { NotificationStack } from 'react-notification';
  3. import {
  4. dismissNotification,
  5. clearNotifications
  6. } from '../../../actions/notifications';
  7. import { getNotifications } from '../../../selectors';
  8. const mapStateToProps = (state, props) => ({
  9. notifications: getNotifications(state)
  10. });
  11. const mapDispatchToProps = (dispatch) => {
  12. return {
  13. onDismiss: notifiction => {
  14. dispatch(dismissNotification(notifiction));
  15. }
  16. };
  17. };
  18. export default connect(mapStateToProps, mapDispatchToProps)(NotificationStack);