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.
28 lines
730 B
28 lines
730 B
7 years ago
|
// Package imports //
|
||
7 years ago
|
import { connect } from 'react-redux';
|
||
7 years ago
|
|
||
|
// Mastodon imports //
|
||
|
import { closeModal } from '../../../mastodon/actions/modal';
|
||
|
|
||
|
// Our imports //
|
||
|
import { changeLocalSetting } from '../../actions/local_settings';
|
||
|
import Settings from '../../components/settings';
|
||
7 years ago
|
|
||
|
const mapStateToProps = state => ({
|
||
|
settings: state.get('local_settings'),
|
||
|
});
|
||
|
|
||
|
const mapDispatchToProps = dispatch => ({
|
||
|
toggleSetting (setting, e) {
|
||
|
dispatch(changeLocalSetting(setting, e.target.checked));
|
||
|
},
|
||
7 years ago
|
changeSetting (setting, e) {
|
||
|
dispatch(changeLocalSetting(setting, e.target.value));
|
||
|
},
|
||
7 years ago
|
onClose () {
|
||
|
dispatch(closeModal());
|
||
|
},
|
||
|
});
|
||
|
|
||
7 years ago
|
export default connect(mapStateToProps, mapDispatchToProps)(Settings);
|