about summary refs log tree commit diff
diff options
context:
space:
mode:
authorkibigo! <marrus-sh@users.noreply.github.com>2017-07-12 02:36:40 -0700
committerkibigo! <marrus-sh@users.noreply.github.com>2017-07-12 02:36:40 -0700
commit183f993b018dfa2f4d4886f5c211e6a9968f4eb6 (patch)
treee42c121382f6dc3dfd056950ea451091554ce398
parente53fbb4a09ef0b53236840352f3a800b76b2f961 (diff)
Linting fixes
-rw-r--r--app/javascript/glitch/components/compose/advanced_options.js28
1 files changed, 15 insertions, 13 deletions
diff --git a/app/javascript/glitch/components/compose/advanced_options.js b/app/javascript/glitch/components/compose/advanced_options.js
index 0d22f2546..17fc1d801 100644
--- a/app/javascript/glitch/components/compose/advanced_options.js
+++ b/app/javascript/glitch/components/compose/advanced_options.js
@@ -20,10 +20,11 @@ const iconStyle = {
 };
 
 class AdvancedOptionToggle extends React.PureComponent {
-  static PropTypes = {
+
+  static propTypes = {
     onChange: PropTypes.func.isRequired,
     active: PropTypes.bool.isRequired,
-    key: PropTypes.string.isRequired,
+    name: PropTypes.string.isRequired,
     shortText: PropTypes.string.isRequired,
     longText: PropTypes.string.isRequired,
   }
@@ -34,18 +35,19 @@ class AdvancedOptionToggle extends React.PureComponent {
 
   render() {
     const { active, shortText, longText } = this.props;
-      return (
-        <div role='button' className='advanced-options-dropdown__option' onClick={this.onToggle}>
-          <div className='advanced-options-dropdown__option__toggle'>
-            <Toggle checked={active} onChange={this.onToggle} />
-          </div>
-          <div className='advanced-options-dropdown__option__content'>
-            <strong>{shortText}</strong>
-            {longText}
-          </div>
+    return (
+      <div role='button' tabIndex='0' className='advanced-options-dropdown__option' onClick={this.onToggle}>
+        <div className='advanced-options-dropdown__option__toggle'>
+          <Toggle checked={active} onChange={this.onToggle} />
         </div>
-      );
+        <div className='advanced-options-dropdown__option__content'>
+          <strong>{shortText}</strong>
+          {longText}
+        </div>
+      </div>
+    );
   }
+
 }
 
 @injectIntl
@@ -98,7 +100,7 @@ export default class ComposeAdvancedOptions extends React.PureComponent {
     const { intl, values } = this.props;
 
     const options = [
-      { icon: 'wifi', shortText: messages.local_only_short,  longText: messages.local_only_long, key: 'do_not_federate' },
+      { icon: 'wifi', shortText: messages.local_only_short, longText: messages.local_only_long, key: 'do_not_federate' },
     ];
 
     const anyEnabled = values.some((enabled) => enabled);