about summary refs log tree commit diff
path: root/app/assets/javascripts/components/containers
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-09-03 14:01:10 +0200
committerEugen Rochko <eugen@zeonfederated.com>2016-09-03 14:01:42 +0200
commitd0e2733f63a7bd9601e73adee1107da804f85c41 (patch)
tree9268986d2ae72a55d84b9d9b90328fa58bb3bf98 /app/assets/javascripts/components/containers
parentf24cb32e99afdb9fa31067fb647912fec92e9ed4 (diff)
Fix reblogs of reblogs in UI, add follow form in UI
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.jsx24
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);