From 312c51b5c87e23c62d163770d550dc94df32627f Mon Sep 17 00:00:00 2001
From: Eugen Rochko <eugen@zeonfederated.com>
Date: Tue, 10 Jan 2017 17:25:10 +0100
Subject: Home column filters

---
 .../containers/column_settings_container.jsx        | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
 create mode 100644 app/assets/javascripts/components/features/home_timeline/containers/column_settings_container.jsx

(limited to 'app/assets/javascripts/components/features/home_timeline/containers/column_settings_container.jsx')

diff --git a/app/assets/javascripts/components/features/home_timeline/containers/column_settings_container.jsx b/app/assets/javascripts/components/features/home_timeline/containers/column_settings_container.jsx
new file mode 100644
index 000000000..3b3ce19bc
--- /dev/null
+++ b/app/assets/javascripts/components/features/home_timeline/containers/column_settings_container.jsx
@@ -0,0 +1,21 @@
+import { connect } from 'react-redux';
+import ColumnSettings from '../components/column_settings';
+import { changeSetting, saveSettings } from '../../../actions/settings';
+
+const mapStateToProps = state => ({
+  settings: state.getIn(['settings', 'home'])
+});
+
+const mapDispatchToProps = dispatch => ({
+
+  onChange (key, checked) {
+    dispatch(changeSetting(['home', ...key], checked));
+  },
+
+  onSave () {
+    dispatch(saveSettings());
+  }
+
+});
+
+export default connect(mapStateToProps, mapDispatchToProps)(ColumnSettings);
-- 
cgit 

