bigbuffet-rw/app/soapbox/features/home_timeline/containers/column_settings_container.js
2020-05-28 17:56:55 -05:00

25 lines
541 B
JavaScript

import { connect } from 'react-redux';
import ColumnSettings from '../components/column_settings';
import {
getSettings,
changeSetting,
saveSettings,
} from '../../../actions/settings';
const mapStateToProps = state => ({
settings: getSettings(state).get('home'),
});
const mapDispatchToProps = dispatch => ({
onChange(key, checked) {
dispatch(changeSetting(['home', ...key], checked));
},
onSave() {
dispatch(saveSettings());
},
});
export default connect(mapStateToProps, mapDispatchToProps)(ColumnSettings);