Please Codeclimate

th-downstream
Claire 3 years ago
parent 1af75ba990
commit e689495a81

@ -120,7 +120,7 @@ export default class ComposerOptionsDropdown extends React.PureComponent {
const i = Number(e.currentTarget.getAttribute('data-index')); const i = Number(e.currentTarget.getAttribute('data-index'));
const { name } = this.props.items[i]; const { name } = items[i];
e.preventDefault(); // Prevents focus from changing e.preventDefault(); // Prevents focus from changing
if (closeOnChange) onModalClose(); if (closeOnChange) onModalClose();
@ -129,7 +129,6 @@ export default class ComposerOptionsDropdown extends React.PureComponent {
// Creates an action modal object. // Creates an action modal object.
handleMakeModal = () => { handleMakeModal = () => {
const component = this;
const { const {
items, items,
onChange, onChange,

@ -96,7 +96,7 @@ class ToggleOption extends ImmutablePureComponent {
}; };
render() { render() {
const { name, meta, text, checked } = this.props; const { meta, text, checked } = this.props;
return ( return (
<React.Fragment> <React.Fragment>
@ -173,7 +173,7 @@ class ComposerOptions extends ImmutablePureComponent {
this.fileElement = fileElement; this.fileElement = fileElement;
} }
renderToggleItemContents = (item, index) => { renderToggleItemContents = (item) => {
const { onChangeAdvancedOption } = this.props; const { onChangeAdvancedOption } = this.props;
const { name, meta, text } = item; const { name, meta, text } = item;

@ -1,7 +1,7 @@
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import React from 'react'; import React from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePropTypes from 'react-immutable-proptypes';
import { FormattedMessage, defineMessages, injectIntl } from 'react-intl'; import { defineMessages, injectIntl } from 'react-intl';
import Dropdown from './dropdown'; import Dropdown from './dropdown';
const messages = defineMessages({ const messages = defineMessages({

Loading…
Cancel
Save