From d0e2733f63a7bd9601e73adee1107da804f85c41 Mon Sep 17 00:00:00 2001
From: Eugen Rochko <eugen@zeonfederated.com>
Date: Sat, 3 Sep 2016 14:01:10 +0200
Subject: Fix reblogs of reblogs in UI, add follow form in UI

---
 .../containers/follow_form_container.jsx           | 24 ++++++++++++++++++++++
 1 file changed, 24 insertions(+)
 create mode 100644 app/assets/javascripts/components/containers/follow_form_container.jsx

(limited to 'app/assets/javascripts/components/containers/follow_form_container.jsx')

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);
-- 
cgit 

