2020-03-27 13:59:38 -07:00
|
|
|
import { connect } from 'react-redux';
|
|
|
|
import { cancelReplyCompose } from '../../../actions/compose';
|
|
|
|
import { makeGetStatus } from '../../../selectors';
|
|
|
|
import ReplyIndicator from '../components/reply_indicator';
|
|
|
|
|
|
|
|
const makeMapStateToProps = () => {
|
|
|
|
const getStatus = makeGetStatus();
|
|
|
|
|
|
|
|
const mapStateToProps = state => ({
|
|
|
|
status: getStatus(state, { id: state.getIn(['compose', 'in_reply_to']) }),
|
|
|
|
});
|
|
|
|
|
|
|
|
return mapStateToProps;
|
|
|
|
};
|
|
|
|
|
|
|
|
const mapDispatchToProps = dispatch => ({
|
|
|
|
|
2020-04-14 14:47:35 -07:00
|
|
|
onCancel() {
|
2020-03-27 13:59:38 -07:00
|
|
|
dispatch(cancelReplyCompose());
|
|
|
|
},
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
export default connect(makeMapStateToProps, mapDispatchToProps)(ReplyIndicator);
|