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.

24 lines
601 B

  1. // Package imports //
  2. import { connect } from 'react-redux';
  3. // Mastodon imports //
  4. import { closeModal } from 'mastodon/actions/modal';
  5. // Our imports //
  6. import { changeLocalSetting } from 'glitch/actions/local_settings';
  7. import LocalSettings from '.';
  8. const mapStateToProps = state => ({
  9. settings: state.get('local_settings'),
  10. });
  11. const mapDispatchToProps = dispatch => ({
  12. onChange (setting, value) {
  13. dispatch(changeLocalSetting(setting, value));
  14. },
  15. onClose () {
  16. dispatch(closeModal());
  17. },
  18. });
  19. export default connect(mapStateToProps, mapDispatchToProps)(LocalSettings);