tootlab-mastodon/app/javascript/glitch/components/local_settings/container.js

25 lines
601 B
JavaScript
Raw Normal View History

// Package imports //
2017-06-29 01:00:54 -04:00
import { connect } from 'react-redux';
// Mastodon imports //
import { closeModal } from 'mastodon/actions/modal';
// Our imports //
import { changeLocalSetting } from 'glitch/actions/local_settings';
2017-07-19 22:54:02 -04:00
import LocalSettings from '.';
2017-06-29 01:00:54 -04:00
const mapStateToProps = state => ({
settings: state.get('local_settings'),
});
const mapDispatchToProps = dispatch => ({
2017-07-19 22:54:02 -04:00
onChange (setting, value) {
dispatch(changeLocalSetting(setting, value));
},
2017-06-29 01:00:54 -04:00
onClose () {
dispatch(closeModal());
},
});
2017-07-19 22:54:02 -04:00
export default connect(mapStateToProps, mapDispatchToProps)(LocalSettings);