0
0
Fork 0

Cleaning up action names and compose drawer

This commit is contained in:
Eugen Rochko 2016-08-31 16:15:12 +02:00
parent 92afd29650
commit 72591cc6d5
29 changed files with 468 additions and 151 deletions

View file

@ -1,15 +1,22 @@
import { connect } from 'react-redux';
import ComposerDrawer from '../components/composer_drawer';
import { publish } from '../actions/statuses';
import { connect } from 'react-redux';
import ComposerDrawer from '../components/composer_drawer';
import { changeCompose, submitCompose } from '../actions/compose';
const mapStateToProps = function (state, props) {
return {};
return {
text: state.getIn(['compose', 'text']),
isSubmitting: state.getIn(['compose', 'isSubmitting'])
};
};
const mapDispatchToProps = function (dispatch) {
return {
onSubmit: function (text, in_reply_to_id) {
dispatch(publish(text, in_reply_to_id));
onChange: function (text) {
dispatch(changeCompose(text));
},
onSubmit: function () {
dispatch(submitCompose());
}
}
};