logo

mastofe

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

reply_indicator_container.js (622B)


  1. import { connect } from 'react-redux';
  2. import { cancelReplyCompose } from '../../../actions/compose';
  3. import { makeGetStatus } from '../../../selectors';
  4. import ReplyIndicator from '../components/reply_indicator';
  5. const makeMapStateToProps = () => {
  6. const getStatus = makeGetStatus();
  7. const mapStateToProps = state => ({
  8. status: getStatus(state, state.getIn(['compose', 'in_reply_to'])),
  9. });
  10. return mapStateToProps;
  11. };
  12. const mapDispatchToProps = dispatch => ({
  13. onCancel () {
  14. dispatch(cancelReplyCompose());
  15. },
  16. });
  17. export default connect(makeMapStateToProps, mapDispatchToProps)(ReplyIndicator);