Switch to compose route when replying and compose is not mounted

This commit is contained in:
Eugen Rochko
2016-11-21 10:52:11 +01:00
parent 93577f74e7
commit d32e0364f9
6 changed files with 56 additions and 14 deletions

View File

@ -38,6 +38,9 @@ const makeMapStateToProps = () => {
};
const Status = React.createClass({
contextTypes: {
router: React.PropTypes.object
},
propTypes: {
params: React.PropTypes.object.isRequired,
@ -64,7 +67,7 @@ const Status = React.createClass({
},
handleReplyClick (status) {
this.props.dispatch(replyCompose(status));
this.props.dispatch(replyCompose(status, this.context.router));
},
handleReblogClick (status) {