Skip to content

Commit

Permalink
chore: apply lint fixes
Browse files Browse the repository at this point in the history
Signed-off-by: Thuan Vo <[email protected]>
  • Loading branch information
tthvo committed Jul 9, 2024
1 parent f49e8b3 commit 6579c21
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 11 deletions.
5 changes: 1 addition & 4 deletions frontend/src/components/editor/BundleDownloader.js
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,4 @@ const mapStateToProps = state => ({
operatorPackage: state.editorState.operatorPackage
});

export default connect(
mapStateToProps,
mapDispatchToProps
)(OperatorBundleDownloader);
export default connect(mapStateToProps, mapDispatchToProps)(OperatorBundleDownloader);
12 changes: 10 additions & 2 deletions frontend/src/components/editor/RulesEditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,18 @@ class RulesEditor extends React.Component {
if (selections.includes('*') && selections.length > 1) {
const prevSelections = _.get(rule, field);
if (prevSelections.includes('*')) {
this.updateRule(rule, field, _.filter(selections, selection => selection !== '*'));
this.updateRule(
rule,
field,
_.filter(selections, selection => selection !== '*')
);
return;
}
this.updateRule(rule, field, _.filter(selections, selection => selection === '*'));
this.updateRule(
rule,
field,
_.filter(selections, selection => selection === '*')
);
return;
}

Expand Down
7 changes: 2 additions & 5 deletions frontend/src/pages/operatorHub/OperatorHub.js
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,7 @@ class OperatorHub extends React.Component {
{_.map(this.sortCategories(categories), category => (
<div key={category} className={`oh-category-item ${category === selectedCategory ? 'selected' : ''}`}>
<button className="oh-category-item__select" onClick={e => this.categorySelect(e, category)}>
{category.length == 0 ? 'All' : category}
{category.length === 0 ? 'All' : category}
</button>
{category === selectedCategory && (
<button className="oh-category-item__deselect" onClick={e => this.categorySelect(e, '')}>
Expand Down Expand Up @@ -890,7 +890,4 @@ const mapStateToProps = state => ({
...state.viewState
});

export default connect(
mapStateToProps,
mapDispatchToProps
)(OperatorHub);
export default connect(mapStateToProps, mapDispatchToProps)(OperatorHub);

0 comments on commit 6579c21

Please sign in to comment.