~cytrogen/masto-fe

ref: f8dc013b0d81d5d463c086e291ce99ab1d796a9d masto-fe/app/javascript/flavours/glitch/features/notifications/containers/notification_container.js -rw-r--r-- 796 bytes
f8dc013b — Cytrogen [feature] Add language selector to local settings 10 days ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
//  Package imports.
import { connect } from "react-redux";

//  Our imports.
import { mentionCompose } from "flavours/glitch/actions/compose";
import { makeGetNotification } from "flavours/glitch/selectors";

import Notification from "../components/notification";

const makeMapStateToProps = () => {
  const getNotification = makeGetNotification();

  const mapStateToProps = (state, props) => ({
    notification: getNotification(state, props.notification, props.accountId),
    notifCleaning: state.getIn(["notifications", "cleaningMode"]),
  });

  return mapStateToProps;
};

const mapDispatchToProps = dispatch => ({
  onMention: (account, router) => {
    dispatch(mentionCompose(account, router));
  },
});

export default connect(makeMapStateToProps, mapDispatchToProps)(Notification);