about summary refs log tree commit diff
path: root/app/javascript/glitch/components/local_settings/container.js
diff options
context:
space:
mode:
authorkibigo! <marrus-sh@users.noreply.github.com>2017-07-19 19:54:02 -0700
committerkibigo! <marrus-sh@users.noreply.github.com>2017-07-19 20:41:28 -0700
commitd2352246920800e491466d84b0146feb4d1d791f (patch)
tree3435a79e0e4c4ec041bc11f1926560749f746d88 /app/javascript/glitch/components/local_settings/container.js
parent0a678cf377c6dd91c439fa91f75782e457836639 (diff)
Restructured local settings internals
Diffstat (limited to 'app/javascript/glitch/components/local_settings/container.js')
-rw-r--r--app/javascript/glitch/components/local_settings/container.js24
1 files changed, 24 insertions, 0 deletions
diff --git a/app/javascript/glitch/components/local_settings/container.js b/app/javascript/glitch/components/local_settings/container.js
new file mode 100644
index 000000000..6c202a4e7
--- /dev/null
+++ b/app/javascript/glitch/components/local_settings/container.js
@@ -0,0 +1,24 @@
+//  Package imports  //
+import { connect } from 'react-redux';
+
+//  Mastodon imports  //
+import { closeModal } from 'mastodon/actions/modal';
+
+//  Our imports  //
+import { changeLocalSetting } from 'glitch/actions/local_settings';
+import LocalSettings from '.';
+
+const mapStateToProps = state => ({
+  settings: state.get('local_settings'),
+});
+
+const mapDispatchToProps = dispatch => ({
+  onChange (setting, value) {
+    dispatch(changeLocalSetting(setting, value));
+  },
+  onClose () {
+    dispatch(closeModal());
+  },
+});
+
+export default connect(mapStateToProps, mapDispatchToProps)(LocalSettings);