2017-07-12 17:02:51 +09:00
|
|
|
// Package imports //
|
2017-06-29 14:00:54 +09:00
|
|
|
import { connect } from 'react-redux';
|
2017-07-12 17:02:51 +09:00
|
|
|
|
|
|
|
// Mastodon imports //
|
2017-07-18 12:06:31 +09:00
|
|
|
import { closeModal } from 'mastodon/actions/modal';
|
2017-07-12 17:02:51 +09:00
|
|
|
|
|
|
|
// Our imports //
|
2017-07-18 12:06:31 +09:00
|
|
|
import { changeLocalSetting } from 'glitch/actions/local_settings';
|
2017-07-20 11:54:02 +09:00
|
|
|
import LocalSettings from '.';
|
2017-06-29 14:00:54 +09:00
|
|
|
|
|
|
|
const mapStateToProps = state => ({
|
|
|
|
settings: state.get('local_settings'),
|
|
|
|
});
|
|
|
|
|
|
|
|
const mapDispatchToProps = dispatch => ({
|
2017-07-20 11:54:02 +09:00
|
|
|
onChange (setting, value) {
|
|
|
|
dispatch(changeLocalSetting(setting, value));
|
2017-07-04 11:51:00 +09:00
|
|
|
},
|
2017-06-29 14:00:54 +09:00
|
|
|
onClose () {
|
|
|
|
dispatch(closeModal());
|
|
|
|
},
|
|
|
|
});
|
|
|
|
|
2017-07-20 11:54:02 +09:00
|
|
|
export default connect(mapStateToProps, mapDispatchToProps)(LocalSettings);
|