This repository has been archived on 2024-07-31. You can view files and clone it, but cannot push or open issues or pull requests.
2016-09-03 08:01:10 -04:00
|
|
|
import { connect } from 'react-redux';
|
|
|
|
import FollowForm from '../components/follow_form';
|
2016-09-19 17:25:59 -04:00
|
|
|
import { changeFollow, submitFollow } from '../../../actions/follow';
|
2016-09-03 08:01:10 -04:00
|
|
|
|
|
|
|
const mapStateToProps = function (state, props) {
|
|
|
|
return {
|
|
|
|
text: state.getIn(['follow', 'text']),
|
|
|
|
is_submitting: state.getIn(['follow', 'is_submitting'])
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
const mapDispatchToProps = function (dispatch) {
|
|
|
|
return {
|
|
|
|
onChange: function (text) {
|
|
|
|
dispatch(changeFollow(text));
|
|
|
|
},
|
|
|
|
|
2016-09-25 09:26:56 -04:00
|
|
|
onSubmit: function (router) {
|
|
|
|
dispatch(submitFollow(router));
|
2016-09-03 08:01:10 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
export default connect(mapStateToProps, mapDispatchToProps)(FollowForm);
|