Cleaning up action names and compose drawer
This commit is contained in:
parent
92afd29650
commit
72591cc6d5
29 changed files with 468 additions and 151 deletions
|
@ -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());
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue