This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
2017-07-12 01:02:51 -07:00
|
|
|
// Package imports //
|
2017-06-28 22:00:54 -07:00
|
|
|
import { connect } from 'react-redux';
|
2017-07-12 01:02:51 -07:00
|
|
|
|
|
|
|
// Mastodon imports //
|
|
|
|
import { closeModal } from '../../../mastodon/actions/modal';
|
|
|
|
|
|
|
|
// Our imports //
|
|
|
|
import { changeLocalSetting } from '../../actions/local_settings';
|
|
|
|
import Settings from '../../components/settings';
|
2017-06-28 22:00:54 -07:00
|
|
|
|
|
|
|
const mapStateToProps = state => ({
|
|
|
|
settings: state.get('local_settings'),
|
|
|
|
});
|
|
|
|
|
|
|
|
const mapDispatchToProps = dispatch => ({
|
|
|
|
toggleSetting (setting, e) {
|
|
|
|
dispatch(changeLocalSetting(setting, e.target.checked));
|
|
|
|
},
|
2017-07-03 19:51:00 -07:00
|
|
|
changeSetting (setting, e) {
|
|
|
|
dispatch(changeLocalSetting(setting, e.target.value));
|
|
|
|
},
|
2017-06-28 22:00:54 -07:00
|
|
|
onClose () {
|
|
|
|
dispatch(closeModal());
|
|
|
|
},
|
|
|
|
});
|
|
|
|
|
2017-07-12 01:02:51 -07:00
|
|
|
export default connect(mapStateToProps, mapDispatchToProps)(Settings);
|