Skip to content

Commit

Permalink
Linted
Browse files Browse the repository at this point in the history
  • Loading branch information
rufataliy committed Feb 1, 2021
1 parent 63c0bc7 commit 7ea8ca4
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions client/components/common/ToggleGroup.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ export default function ToggleGroup({

const addClasses = component => {
const { props } = component;
const isTheSelectedChild = props.value === selectedValue

const isTheSelectedChild = props.value === selectedValue;

let className = '';

if (isTheSelectedChild) {
className = `${classes.selected} ${classes.regular}`;
} else {
Expand All @@ -58,13 +58,13 @@ export default function ToggleGroup({
};

const handleClick = e => {
const isContainerClicked = e.target.classList.contains(classes.root)
const isContainerClicked = e.target.classList.contains(classes.root);

if (isContainerClicked) return;

let element = e.target;

const isNotDirectChildOfContainer = !element.parentElement.classList.contains(classes.root)
const isNotDirectChildOfContainer = !element.parentElement.classList.contains(classes.root);
while (isNotDirectChildOfContainer) {
element = element.parentElement;
}
Expand Down

0 comments on commit 7ea8ca4

Please sign in to comment.