about summary refs log tree commit diff
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2022-02-09 17:15:36 +0100
committerClaire <claire.github-309c@sitedethib.com>2022-02-09 17:15:36 +0100
commit0bb3d445ab0167ac33bd804333c7f9741c7526ae (patch)
treed1be73fd2f80572f4b54857c51bae95327314e40
parente1a4590bcae65275304046e8887f70592196c003 (diff)
Please Codeclimate
-rw-r--r--app/javascript/flavours/glitch/features/compose/components/dropdown.js3
-rw-r--r--app/javascript/flavours/glitch/features/compose/components/options.js4
-rw-r--r--app/javascript/flavours/glitch/features/compose/components/privacy_dropdown.js2
3 files changed, 4 insertions, 5 deletions
diff --git a/app/javascript/flavours/glitch/features/compose/components/dropdown.js b/app/javascript/flavours/glitch/features/compose/components/dropdown.js
index 4708e2ece..9f70d6b79 100644
--- a/app/javascript/flavours/glitch/features/compose/components/dropdown.js
+++ b/app/javascript/flavours/glitch/features/compose/components/dropdown.js
@@ -120,7 +120,7 @@ export default class ComposerOptionsDropdown extends React.PureComponent {
 
     const i = Number(e.currentTarget.getAttribute('data-index'));
 
-    const { name } = this.props.items[i];
+    const { name } = items[i];
 
     e.preventDefault();  //  Prevents focus from changing
     if (closeOnChange) onModalClose();
@@ -129,7 +129,6 @@ export default class ComposerOptionsDropdown extends React.PureComponent {
 
   //  Creates an action modal object.
   handleMakeModal = () => {
-    const component = this;
     const {
       items,
       onChange,
diff --git a/app/javascript/flavours/glitch/features/compose/components/options.js b/app/javascript/flavours/glitch/features/compose/components/options.js
index d30fb2a98..085da18ea 100644
--- a/app/javascript/flavours/glitch/features/compose/components/options.js
+++ b/app/javascript/flavours/glitch/features/compose/components/options.js
@@ -96,7 +96,7 @@ class ToggleOption extends ImmutablePureComponent {
   };
 
   render() {
-    const { name, meta, text, checked } = this.props;
+    const { meta, text, checked } = this.props;
 
     return (
       <React.Fragment>
@@ -173,7 +173,7 @@ class ComposerOptions extends ImmutablePureComponent {
     this.fileElement = fileElement;
   }
 
-  renderToggleItemContents = (item, index) => {
+  renderToggleItemContents = (item) => {
     const { onChangeAdvancedOption } = this.props;
     const { name, meta, text } = item;
 
diff --git a/app/javascript/flavours/glitch/features/compose/components/privacy_dropdown.js b/app/javascript/flavours/glitch/features/compose/components/privacy_dropdown.js
index 4113e4061..3bf25b3a4 100644
--- a/app/javascript/flavours/glitch/features/compose/components/privacy_dropdown.js
+++ b/app/javascript/flavours/glitch/features/compose/components/privacy_dropdown.js
@@ -1,7 +1,7 @@
 import PropTypes from 'prop-types';
 import React from 'react';
 import ImmutablePropTypes from 'react-immutable-proptypes';
-import { FormattedMessage, defineMessages, injectIntl } from 'react-intl';
+import { defineMessages, injectIntl } from 'react-intl';
 import Dropdown from './dropdown';
 
 const messages = defineMessages({