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.
23 lines
666 B
23 lines
666 B
import { connect } from 'react-redux';
|
|
import { changeLocalSetting } from '../../../actions/local_settings';
|
|
import { closeModal } from '../../../actions/modal';
|
|
import SettingsModal from '../components/settings_modal';
|
|
|
|
const mapStateToProps = state => ({
|
|
settings: state.get('local_settings'),
|
|
});
|
|
|
|
const mapDispatchToProps = dispatch => ({
|
|
toggleSetting (setting, e) {
|
|
dispatch(changeLocalSetting(setting, e.target.checked));
|
|
},
|
|
changeSetting (setting, e) {
|
|
dispatch(changeLocalSetting(setting, e.target.value));
|
|
},
|
|
onClose () {
|
|
dispatch(closeModal());
|
|
},
|
|
});
|
|
|
|
export default connect(mapStateToProps, mapDispatchToProps)(SettingsModal);
|