diff options
Diffstat (limited to 'app/assets/javascripts/components/containers')
-rw-r--r-- | app/assets/javascripts/components/containers/compose_form_container.jsx (renamed from app/assets/javascripts/components/containers/composer_drawer_container.jsx) | 4 | ||||
-rw-r--r-- | app/assets/javascripts/components/containers/follow_form_container.jsx | 24 |
2 files changed, 26 insertions, 2 deletions
diff --git a/app/assets/javascripts/components/containers/composer_drawer_container.jsx b/app/assets/javascripts/components/containers/compose_form_container.jsx index e9cef99b2..534830c27 100644 --- a/app/assets/javascripts/components/containers/composer_drawer_container.jsx +++ b/app/assets/javascripts/components/containers/compose_form_container.jsx @@ -1,5 +1,5 @@ import { connect } from 'react-redux'; -import ComposerDrawer from '../components/composer_drawer'; +import ComposeForm from '../components/compose_form'; import { changeCompose, submitCompose, cancelReplyCompose } from '../actions/compose'; const mapStateToProps = function (state, props) { @@ -26,4 +26,4 @@ const mapDispatchToProps = function (dispatch) { } }; -export default connect(mapStateToProps, mapDispatchToProps)(ComposerDrawer); +export default connect(mapStateToProps, mapDispatchToProps)(ComposeForm); diff --git a/app/assets/javascripts/components/containers/follow_form_container.jsx b/app/assets/javascripts/components/containers/follow_form_container.jsx new file mode 100644 index 000000000..b5f787aba --- /dev/null +++ b/app/assets/javascripts/components/containers/follow_form_container.jsx @@ -0,0 +1,24 @@ +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); |