You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
668 B

  1. import { connect } from 'react-redux';
  2. import ComposerDrawer from '../components/composer_drawer';
  3. import { changeCompose, submitCompose } from '../actions/compose';
  4. const mapStateToProps = function (state, props) {
  5. return {
  6. text: state.getIn(['compose', 'text']),
  7. isSubmitting: state.getIn(['compose', 'isSubmitting'])
  8. };
  9. };
  10. const mapDispatchToProps = function (dispatch) {
  11. return {
  12. onChange: function (text) {
  13. dispatch(changeCompose(text));
  14. },
  15. onSubmit: function () {
  16. dispatch(submitCompose());
  17. }
  18. }
  19. };
  20. export default connect(mapStateToProps, mapDispatchToProps)(ComposerDrawer);