about summary refs log tree commit diff
path: root/app/javascript/glitch/components/compose
diff options
context:
space:
mode:
authorkibigo! <marrus-sh@users.noreply.github.com>2017-07-13 02:40:16 -0700
committerkibigo! <marrus-sh@users.noreply.github.com>2017-07-13 02:40:16 -0700
commit5770d461b21cf5b6a8adcaa44d19832e11289960 (patch)
tree3a72b457fc0303dad71a68d7c0a01e7f736124fd /app/javascript/glitch/components/compose
parent2e0645c26c0738b37b6847142d47f6391c2cd40c (diff)
Moved glitch containers and commented unused files
Diffstat (limited to 'app/javascript/glitch/components/compose')
-rw-r--r--app/javascript/glitch/components/compose/advanced_options/container.js22
-rw-r--r--app/javascript/glitch/components/compose/advanced_options/index.js (renamed from app/javascript/glitch/components/compose/advanced_options.js)2
2 files changed, 23 insertions, 1 deletions
diff --git a/app/javascript/glitch/components/compose/advanced_options/container.js b/app/javascript/glitch/components/compose/advanced_options/container.js
new file mode 100644
index 000000000..10804454a
--- /dev/null
+++ b/app/javascript/glitch/components/compose/advanced_options/container.js
@@ -0,0 +1,22 @@
+//  Package imports  //
+import { connect } from 'react-redux';
+
+//  Mastodon imports  //
+import { toggleComposeAdvancedOption } from '../../../../mastodon/actions/compose';
+
+//  Our imports  //
+import ComposeAdvancedOptions from '.';
+
+const mapStateToProps = state => ({
+  values: state.getIn(['compose', 'advanced_options']),
+});
+
+const mapDispatchToProps = dispatch => ({
+
+  onChange (option) {
+    dispatch(toggleComposeAdvancedOption(option));
+  },
+
+});
+
+export default connect(mapStateToProps, mapDispatchToProps)(ComposeAdvancedOptions);
diff --git a/app/javascript/glitch/components/compose/advanced_options.js b/app/javascript/glitch/components/compose/advanced_options/index.js
index 17fc1d801..dabf66095 100644
--- a/app/javascript/glitch/components/compose/advanced_options.js
+++ b/app/javascript/glitch/components/compose/advanced_options/index.js
@@ -6,7 +6,7 @@ import Toggle from 'react-toggle';
 import { injectIntl, defineMessages } from 'react-intl';
 
 //  Mastodon imports  //
-import IconButton from '../../../mastodon/components/icon_button';
+import IconButton from '../../../../mastodon/components/icon_button';
 
 const messages = defineMessages({
   local_only_short: { id: 'advanced-options.local-only.short', defaultMessage: 'Local-only' },