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.
 
 
 
 
 
 
metu.life/app/assets/javascripts/components/containers/follow_form_container.jsx

24 lines
651 B

import { connect } from 'react-redux';
import FollowForm from '../components/follow_form';
import { changeFollow, submitFollow } from '../actions/follow';
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));
},
onSubmit: function () {
dispatch(submitFollow());
}
}
};
export default connect(mapStateToProps, mapDispatchToProps)(FollowForm);