0
0
Fork 0

Fix reblogs of reblogs in UI, add follow form in UI

This commit is contained in:
Eugen Rochko 2016-09-03 14:01:10 +02:00
parent f24cb32e99
commit d0e2733f63
10 changed files with 113 additions and 21 deletions

View file

@ -0,0 +1,29 @@
import { connect } from 'react-redux';
import ComposeForm from '../components/compose_form';
import { changeCompose, submitCompose, cancelReplyCompose } from '../actions/compose';
const mapStateToProps = function (state, props) {
return {
text: state.getIn(['compose', 'text']),
is_submitting: state.getIn(['compose', 'is_submitting']),
in_reply_to: state.getIn(['compose', 'in_reply_to'])
};
};
const mapDispatchToProps = function (dispatch) {
return {
onChange: function (text) {
dispatch(changeCompose(text));
},
onSubmit: function () {
dispatch(submitCompose());
},
onCancelReply: function () {
dispatch(cancelReplyCompose());
}
}
};
export default connect(mapStateToProps, mapDispatchToProps)(ComposeForm);