forked from mirrors/catstodon
ComposerReply → ReplyIndicator
parent
f72af5794d
commit
8fd599fb40
@ -0,0 +1,22 @@
|
||||
import { connect } from 'react-redux';
|
||||
import { cancelReplyCompose } from 'flavours/glitch/actions/compose';
|
||||
import { makeGetStatus } from 'flavours/glitch/selectors';
|
||||
import ReplyIndicator from '../components/reply_indicator';
|
||||
|
||||
function makeMapStateToProps (state) {
|
||||
const inReplyTo = state.getIn(['compose', 'in_reply_to']);
|
||||
|
||||
return {
|
||||
status: inReplyTo ? state.getIn(['statuses', inReplyTo]) : null,
|
||||
};
|
||||
};
|
||||
|
||||
const mapDispatchToProps = dispatch => ({
|
||||
|
||||
onCancel () {
|
||||
dispatch(cancelReplyCompose());
|
||||
},
|
||||
|
||||
});
|
||||
|
||||
export default connect(makeMapStateToProps, mapDispatchToProps)(ReplyIndicator);
|
Loading…
Reference in New Issue