2020-03-27 13:59:38 -07:00
|
|
|
import { connect } from 'react-redux';
|
|
|
|
import ColumnSettings from '../components/column_settings';
|
|
|
|
import { changeSetting } from '../../../actions/settings';
|
|
|
|
|
|
|
|
const mapStateToProps = state => ({
|
|
|
|
settings: state.getIn(['settings', 'public']),
|
|
|
|
});
|
|
|
|
|
|
|
|
const mapDispatchToProps = (dispatch) => {
|
|
|
|
return {
|
2020-04-14 14:47:35 -07:00
|
|
|
onChange(key, checked) {
|
2020-03-27 13:59:38 -07:00
|
|
|
dispatch(changeSetting(['public', ...key], checked));
|
|
|
|
},
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
export default connect(mapStateToProps, mapDispatchToProps)(ColumnSettings);
|