25 lines
636 B
JavaScript
25 lines
636 B
JavaScript
import { connect } from 'react-redux';
|
|
import { cancelReplyCompose } from 'flavours/glitch/actions/compose';
|
|
import { makeGetStatus } from 'flavours/glitch/selectors';
|
|
import ReplyIndicator from '../components/reply_indicator';
|
|
|
|
const makeMapStateToProps = () => {
|
|
const getStatus = makeGetStatus();
|
|
|
|
const mapStateToProps = state => ({
|
|
status: getStatus(state, state.getIn(['compose', 'in_reply_to'])),
|
|
});
|
|
|
|
return mapStateToProps;
|
|
};
|
|
|
|
const mapDispatchToProps = dispatch => ({
|
|
|
|
onCancel () {
|
|
dispatch(cancelReplyCompose());
|
|
},
|
|
|
|
});
|
|
|
|
export default connect(makeMapStateToProps, mapDispatchToProps)(ReplyIndicator);
|