You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
542 B
22 lines
542 B
8 years ago
|
import { connect } from 'react-redux';
|
||
|
import ColumnSettings from '../components/column_settings';
|
||
8 years ago
|
import { changeSetting, saveSettings } from '../../../actions/settings';
|
||
8 years ago
|
|
||
|
const mapStateToProps = state => ({
|
||
8 years ago
|
settings: state.getIn(['settings', 'notifications'])
|
||
8 years ago
|
});
|
||
|
|
||
|
const mapDispatchToProps = dispatch => ({
|
||
|
|
||
|
onChange (key, checked) {
|
||
8 years ago
|
dispatch(changeSetting(['notifications', ...key], checked));
|
||
8 years ago
|
},
|
||
|
|
||
|
onSave () {
|
||
|
dispatch(saveSettings());
|
||
8 years ago
|
}
|
||
|
|
||
|
});
|
||
|
|
||
|
export default connect(mapStateToProps, mapDispatchToProps)(ColumnSettings);
|