logo

mastofe

My custom branche(s) on git.pleroma.social/pleroma/mastofe git clone https://hacktivis.me/git/mastofe.git

notification_container.js (675B)


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