This repository has been archived on 2024-07-31. You can view files and clone it, but cannot push or open issues or pull requests.
2017-01-02 08:09:57 -05:00
|
|
|
import { connect } from 'react-redux';
|
|
|
|
import ColumnSettings from '../components/column_settings';
|
2017-01-09 08:00:55 -05:00
|
|
|
import { changeSetting } from '../../../actions/settings';
|
2017-01-02 08:09:57 -05:00
|
|
|
|
|
|
|
const mapStateToProps = state => ({
|
2017-01-09 08:00:55 -05:00
|
|
|
settings: state.getIn(['settings', 'notifications'])
|
2017-01-02 08:09:57 -05:00
|
|
|
});
|
|
|
|
|
|
|
|
const mapDispatchToProps = dispatch => ({
|
|
|
|
|
|
|
|
onChange (key, checked) {
|
2017-01-09 08:00:55 -05:00
|
|
|
dispatch(changeSetting(['notifications', ...key], checked));
|
2017-01-02 08:09:57 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
export default connect(mapStateToProps, mapDispatchToProps)(ColumnSettings);
|