mirror of
https://git.kescher.at/CatCatNya/catstodon.git
synced 2024-11-28 16:21:37 +01:00
27 lines
730 B
JavaScript
27 lines
730 B
JavaScript
// Package imports //
|
|
import { connect } from 'react-redux';
|
|
|
|
// Mastodon imports //
|
|
import { closeModal } from '../../../mastodon/actions/modal';
|
|
|
|
// Our imports //
|
|
import { changeLocalSetting } from '../../actions/local_settings';
|
|
import Settings from '../../components/settings';
|
|
|
|
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)(Settings);
|