chore(audio): update some code checks done by sonarcloud

This commit is contained in:
Mario Jr 2021-06-30 18:39:32 -03:00
parent 1890cccae1
commit 2801848789
5 changed files with 6 additions and 9 deletions

View File

@ -4,7 +4,7 @@ import Auth from '/imports/ui/services/auth';
import { defineMessages, injectIntl } from 'react-intl'; import { defineMessages, injectIntl } from 'react-intl';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import Button from '/imports/ui/components/button/component'; import Button from '/imports/ui/components/button/component';
import ButtonEmoji from '/imports/ui/components/button/button-emoji/component'; import ButtonEmoji from '/imports/ui/components/button/button-emoji/ButtonEmoji';
import Dropdown from '/imports/ui/components/dropdown/component'; import Dropdown from '/imports/ui/components/dropdown/component';
import withShortcutHelper from '/imports/ui/components/shortcut-help/service'; import withShortcutHelper from '/imports/ui/components/shortcut-help/service';
import cx from 'classnames'; import cx from 'classnames';

View File

@ -5,7 +5,7 @@ import TooltipContainer from '/imports/ui/components/tooltip/container';
import { styles } from './styles'; import { styles } from './styles';
import Icon from '../icon/component'; import Icon from '../icon/component';
import BaseButton from './base/component'; import BaseButton from './base/component';
import ButtonEmoji from './button-emoji/component'; import ButtonEmoji from './button-emoji/ButtonEmoji';
const SIZES = [ const SIZES = [
'jumbo', 'lg', 'md', 'sm', 'jumbo', 'lg', 'md', 'sm',

View File

@ -84,10 +84,8 @@ export default class DropdownTrigger extends Component {
triggerComponentProps); triggerComponentProps);
const ButtonComponent = React.Children.only(children); const ButtonComponent = React.Children.only(children);
const ButtonComponentBounded = React.cloneElement(ButtonComponent, return React.cloneElement(ButtonComponent,
buttonComponentProps, TriggerComponentBounded); buttonComponentProps, TriggerComponentBounded);
return ButtonComponentBounded;
} }
buttonComponentProps.className = cx(children.props.className, className); buttonComponentProps.className = cx(children.props.className, className);

View File

@ -9,7 +9,8 @@ import 'tippy.js/dist/svg-arrow.css';
import 'tippy.js/animations/shift-away.css'; import 'tippy.js/animations/shift-away.css';
import './bbbtip.css'; import './bbbtip.css';
import BaseButton from '/imports/ui/components/button/base/component'; import BaseButton from '/imports/ui/components/button/base/component';
import ButtonEmoji from '/imports/ui/components/button/button-emoji/component'; import ButtonEmoji from
'/imports/ui/components/button/button-emoji/ButtonEmoji';
const ANIMATION_DURATION = 350; const ANIMATION_DURATION = 350;
const ANIMATION_DELAY = [150, 50]; const ANIMATION_DELAY = [150, 50];
@ -158,10 +159,8 @@ class Tooltip extends Component {
const ParentComponent = React.Children.only(children); const ParentComponent = React.Children.only(children);
const updatedChildren = [WrappedComponentBound, ...otherChildren]; const updatedChildren = [WrappedComponentBound, ...otherChildren];
const ParentComponentBound = React.cloneElement(ParentComponent, null, return React.cloneElement(ParentComponent, null,
updatedChildren); updatedChildren);
return ParentComponentBound;
} }
WrappedComponent = React.Children.only(children); WrappedComponent = React.Children.only(children);