diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2017-01-10 17:25:10 +0100 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2017-01-10 17:25:10 +0100 |
commit | 312c51b5c87e23c62d163770d550dc94df32627f (patch) | |
tree | 29b29205d4c08176bb271854ab82406211b645c5 /app/assets/javascripts/components/features/home_timeline/containers/column_settings_container.jsx | |
parent | 1e9d2c4b1e00e8e68fefe5c04b48f66c827d31d5 (diff) |
Home column filters
Diffstat (limited to 'app/assets/javascripts/components/features/home_timeline/containers/column_settings_container.jsx')
-rw-r--r-- | app/assets/javascripts/components/features/home_timeline/containers/column_settings_container.jsx | 21 |
1 files changed, 21 insertions, 0 deletions
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); |