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.

26 lines
795 B

  1. // Package imports.
  2. import { connect } from 'react-redux';
  3. // Our imports.
  4. import { makeGetNotification } from 'flavours/glitch/selectors';
  5. import Notification from '../components/notification';
  6. import { mentionCompose } from 'flavours/glitch/actions/compose';
  7. const makeMapStateToProps = () => {
  8. const getNotification = makeGetNotification();
  9. const mapStateToProps = (state, props) => ({
  10. notification: getNotification(state, props.notification, props.accountId),
  11. notifCleaning: state.getIn(['notifications', 'cleaningMode']),
  12. });
  13. return mapStateToProps;
  14. };
  15. const mapDispatchToProps = dispatch => ({
  16. onMention: (account, router) => {
  17. dispatch(mentionCompose(account, router));
  18. },
  19. });
  20. export default connect(makeMapStateToProps, mapDispatchToProps)(Notification);