2020-03-27 13:59:38 -07:00
|
|
|
import { connect } from 'react-redux';
|
|
|
|
import ColumnSettings from '../components/column_settings';
|
2020-04-28 11:49:39 -07:00
|
|
|
import { getSettings, changeSetting } from '../../../actions/settings';
|
2020-03-27 13:59:38 -07:00
|
|
|
|
|
|
|
const mapStateToProps = state => ({
|
2020-04-28 11:49:39 -07:00
|
|
|
settings: getSettings(state).get('community'),
|
2020-03-27 13:59:38 -07:00
|
|
|
});
|
|
|
|
|
|
|
|
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(['community', ...key], checked));
|
|
|
|
},
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
export default connect(mapStateToProps, mapDispatchToProps)(ColumnSettings);
|