mirror of
https://github.com/lunaisnotaboy/mastodon.git
synced 2024-08-26 10:26:25 +00:00
25 lines
651 B
React
25 lines
651 B
React
|
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);
|