Skip to content

Commit

Permalink
FIX ESLint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Sabina Talipova committed Jun 30, 2023
1 parent ad4bf54 commit bc889b7
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion client/dist/js/bundle.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions client/src/components/ColorPickerField/ColorPickerField.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ class ColorPickerField extends Component {
}

handleToggle() {
this.setState({
isOpen: !this.state.isOpen
});
this.setState((prevState) => ({
isOpen: !prevState.isOpen,
}));
}

renderButton() {
Expand Down Expand Up @@ -61,14 +61,14 @@ class ColorPickerField extends Component {
/>,
<span className="color-picker-field-popover__option-label">
{color.Title}
</span>
</span>,
];

const buttons = colors.map((color) => ({
key: color.CSSClass,
content: buttonContent(color),
className: ['color-picker-field-popover__option', {
'color-picker-field-popover__option--selected': color.CSSClass === value
'color-picker-field-popover__option--selected': color.CSSClass === value,
}],
text: color.Title,
onClick: () => {
Expand All @@ -80,7 +80,7 @@ class ColorPickerField extends Component {
}));

const handleSearch = (term, set) => set.filter(
({ text }) => text.toLowerCase().includes(term.toLowerCase())
({ text }) => text.toLowerCase().includes(term.toLowerCase()),
);

return (
Expand Down Expand Up @@ -124,5 +124,5 @@ ColorPickerField.propTypes = {
export default inject(
['PopoverOptionSet'],
(PopoverOptionSetComponent) => ({ PopoverOptionSetComponent }),
() => 'ColorPickerField'
() => 'ColorPickerField',
)(ColorPickerField);
14 changes: 7 additions & 7 deletions client/src/components/FontPickerField/FontPickerField.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ class FontPickerField extends Component {
}

handleToggle() {
this.setState({
isOpen: !this.state.isOpen
});
this.setState((prevState) => ({
isOpen: !prevState.isOpen,
}));
}

renderSelectorButton() {
Expand Down Expand Up @@ -76,7 +76,7 @@ class FontPickerField extends Component {
value: font.CSSClass,
selectedFont: font.Title,
});
}
},
}));

return (
Expand All @@ -97,11 +97,11 @@ class FontPickerField extends Component {

const previewTextSentence = i18n._t(
'FontPickerField.PREVIEW_FONT_SENTENCE',
'The quick brown fox jumps over the lazy dog.'
'The quick brown fox jumps over the lazy dog.',
);
const previewTextAlphabet = i18n._t(
'FontPickerField.PREVIEW_FONT_ALPHABET',
'AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz 0123456789 - = _ + < > ? / . , : "'
'AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz 0123456789 - = _ + < > ? / . , : "',
);
return (
<div
Expand Down Expand Up @@ -142,5 +142,5 @@ FontPickerField.propTypes = {
export default inject(
['PopoverOptionSet'],
(PopoverOptionSetComponent) => ({ PopoverOptionSetComponent }),
() => 'FontPickerField'
() => 'FontPickerField',
)(FontPickerField);
6 changes: 3 additions & 3 deletions client/src/legacy/entwine.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jQuery.entwine('ss', ($) => {
root = createRoot(this[0]);
this.setReactRoot(root);
}
root.render(<ColorPickerComponent {...props} />,);
root.render(<ColorPickerComponent {...props} />);
},

onunmatch() {
Expand All @@ -31,7 +31,7 @@ jQuery.entwine('ss', ($) => {
root.unmount();
this.setReactRoot(null);
}
}
},
});

$('.js-injector-boot .form__field-holder .font-picker-field').entwine({
Expand Down Expand Up @@ -61,6 +61,6 @@ jQuery.entwine('ss', ($) => {
root.unmount();
this.setReactRoot(null);
}
}
},
});
});

0 comments on commit bc889b7

Please sign in to comment.