gab-social/app/javascript/gabsocial/features/groups_timeline/containers/column_settings_container.js

21 lines
496 B
JavaScript
Raw Normal View History

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);