2019-08-09 03:57:12 +01:00
|
|
|
import ColumnSettings from '../components/column_settings';
|
|
|
|
import { changeSetting, saveSettings } from '../../../../actions/settings';
|
|
|
|
|
2020-04-11 23:29:19 +01:00
|
|
|
const mapStateToProps = (state) => ({
|
2019-08-09 03:57:12 +01:00
|
|
|
settings: state.getIn(['settings', 'group']),
|
|
|
|
});
|
|
|
|
|
2020-04-11 23:29:19 +01:00
|
|
|
const mapDispatchToProps = (dispatch) => ({
|
2019-08-09 03:57:12 +01:00
|
|
|
|
|
|
|
onChange (key, checked) {
|
|
|
|
dispatch(changeSetting(['group', ...key], checked));
|
|
|
|
},
|
|
|
|
|
|
|
|
onSave () {
|
|
|
|
dispatch(saveSettings());
|
|
|
|
},
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
export default connect(mapStateToProps, mapDispatchToProps)(ColumnSettings);
|