From 2c5068727997d4b223e74e765df75d9773b954f7 Mon Sep 17 00:00:00 2001
From: Eugen Rochko <eugen@zeonfederated.com>
Date: Sun, 26 Feb 2017 01:23:44 +0100
Subject: Improve compose form performance, upgrade JS dependencies.
 LightingBox now allows to cycle through multiple images

---
 .../compose/containers/spoiler_toggle_container.jsx     | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 app/assets/javascripts/components/features/compose/containers/spoiler_toggle_container.jsx

(limited to 'app/assets/javascripts/components/features/compose/containers/spoiler_toggle_container.jsx')

diff --git a/app/assets/javascripts/components/features/compose/containers/spoiler_toggle_container.jsx b/app/assets/javascripts/components/features/compose/containers/spoiler_toggle_container.jsx
new file mode 100644
index 000000000..0bd4df759
--- /dev/null
+++ b/app/assets/javascripts/components/features/compose/containers/spoiler_toggle_container.jsx
@@ -0,0 +1,17 @@
+import { connect } from 'react-redux';
+import SpoilerToggle from '../components/spoiler_toggle';
+import { changeComposeSpoilerness } from '../../../actions/compose';
+
+const mapStateToProps = state => ({
+  isSpoiler: state.getIn(['compose', 'spoiler'])
+});
+
+const mapDispatchToProps = dispatch => ({
+
+  onChange (e) {
+    dispatch(changeComposeSpoilerness(e.target.checked));
+  }
+
+});
+
+export default connect(mapStateToProps, mapDispatchToProps)(SpoilerToggle);
-- 
cgit 

