diff options
Diffstat (limited to 'app/assets/javascripts/components/containers/composer_drawer_container.jsx')
-rw-r--r-- | app/assets/javascripts/components/containers/composer_drawer_container.jsx | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/app/assets/javascripts/components/containers/composer_drawer_container.jsx b/app/assets/javascripts/components/containers/composer_drawer_container.jsx index 4ec0f1c50..2a7344509 100644 --- a/app/assets/javascripts/components/containers/composer_drawer_container.jsx +++ b/app/assets/javascripts/components/containers/composer_drawer_container.jsx @@ -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()); } } }; |