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
651 B

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