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 //
|
||
8 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';
|
||
8 years ago
|
|
||
|
const mapStateToProps = state => ({
|
||
|
settings: state.get('local_settings'),
|
||
|
});
|
||
|
|
||
|
const mapDispatchToProps = dispatch => ({
|
||
|
toggleSetting (setting, e) {
|
||
|
dispatch(changeLocalSetting(setting, e.target.checked));
|
||
|
},
|
||
8 years ago
|
changeSetting (setting, e) {
|
||
|
dispatch(changeLocalSetting(setting, e.target.value));
|
||
|
},
|
||
8 years ago
|
onClose () {
|
||
|
dispatch(closeModal());
|
||
|
},
|
||
|
});
|
||
|
|
||
7 years ago
|
export default connect(mapStateToProps, mapDispatchToProps)(Settings);
|