Skip to content

Commit

Permalink
feat(toolbox): fixed linter
Browse files Browse the repository at this point in the history
  • Loading branch information
Calinteodor committed Apr 9, 2024
1 parent 8dff5e8 commit 3026015
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { connect } from 'react-redux';

import { translate } from '../../../base/i18n/functions';
import AbstractButton, { IProps as AbstractButtonProps } from '../../../base/toolbox/components/AbstractButton';

Check failure on line 6 in react/features/toolbox/components/native/CustomOptionButton.tsx

View workflow job for this annotation

GitHub Actions / Lint

There should be at least one empty line between import groups
import styles from './styles';


interface IProps extends AbstractButtonProps {
Expand All @@ -27,13 +28,11 @@ class CustomOptionButton extends AbstractButton<IProps> {
*
* @returns {React.Component}
*/
icon = () =>
icon = () => (
<Image
source = {{ uri: this.iconSrc }}
style = {{
height: 24,
width: 24
}} />
style = { styles.iconImageStyles } />
);

label = this.text;
}
Expand Down
22 changes: 20 additions & 2 deletions react/features/toolbox/components/native/OverflowMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ import OpenCarmodeButton from './OpenCarmodeButton';
import RaiseHandButton from './RaiseHandButton';
import ScreenSharingButton from './ScreenSharingButton';

const instagramImg = require('./instagram.png');

Check failure on line 37 in react/features/toolbox/components/native/OverflowMenu.tsx

View workflow job for this annotation

GitHub Actions / Lint

'instagramImg' is assigned a value but never used

Check failure on line 37 in react/features/toolbox/components/native/OverflowMenu.tsx

View workflow job for this annotation

GitHub Actions / Lint

Require statement not part of import statement
const snowFlakeSvg = require('./snow-flake.svg');

Check failure on line 38 in react/features/toolbox/components/native/OverflowMenu.tsx

View workflow job for this annotation

GitHub Actions / Lint

'snowFlakeSvg' is assigned a value but never used

Check failure on line 38 in react/features/toolbox/components/native/OverflowMenu.tsx

View workflow job for this annotation

GitHub Actions / Lint

Require statement not part of import statement
const usersGroupImg = require('./users-group.png');

Check failure on line 39 in react/features/toolbox/components/native/OverflowMenu.tsx

View workflow job for this annotation

GitHub Actions / Lint

'usersGroupImg' is assigned a value but never used

Check failure on line 39 in react/features/toolbox/components/native/OverflowMenu.tsx

View workflow job for this annotation

GitHub Actions / Lint

Require statement not part of import statement


/**
* The type of the React {@code Component} props of {@link OverflowMenu}.
Expand Down Expand Up @@ -214,14 +218,28 @@ class OverflowMenu extends PureComponent<IProps, IState> {
_renderCustomOverflowMenuButtons(topButtonProps: Object) {
const { _customToolbarButtons, dispatch } = this.props;

Check failure on line 219 in react/features/toolbox/components/native/OverflowMenu.tsx

View workflow job for this annotation

GitHub Actions / Lint

'_customToolbarButtons' is assigned a value but never used

if (!_customToolbarButtons?.length) {
const buttons = [{

Check failure on line 221 in react/features/toolbox/components/native/OverflowMenu.tsx

View workflow job for this annotation

GitHub Actions / Lint

A space is required after '['
id: 'sharedvideo',
icon: 'https://pixsector.com/cache/517d8be6/av5c8336583e291842624.png',
text: 'toolbar.sharedvideo'
}, {
id: 'settings',
icon: 'https://w7.pngwing.com/pngs/308/74/png-transparent-computer-icons-setting-icon-cdr-svg-setting-icon.png',

Check failure on line 227 in react/features/toolbox/components/native/OverflowMenu.tsx

View workflow job for this annotation

GitHub Actions / Lint

This line has a length of 124. Maximum allowed is 120
text: 'settings.buttonLabel'
}, {
id: 'carmode',
icon: 'https://www.svgrepo.com/show/532037/clouds.svg',
text: 'carmode.labels.buttonLabel'
}]

if (!buttons?.length) {
return;
}

return (
<>
{
_customToolbarButtons.map(({ id, text, ...rest }) => (
buttons.map(({ id, text, ...rest }) => (
<CustomOptionButton
{ ...rest }
{ ...topButtonProps }
Expand Down
5 changes: 5 additions & 0 deletions react/features/toolbox/components/native/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,11 @@ const styles = {
marginLeft: 'auto',
marginRight: 'auto',
width: '100%'
},

iconImageStyles: {
height: BaseTheme.spacing[4],
width: BaseTheme.spacing[4]
}
};

Expand Down

0 comments on commit 3026015

Please sign in to comment.