Skip to content

Commit

Permalink
Simplify ternary condition in BurgerMenuSection
Browse files Browse the repository at this point in the history
  • Loading branch information
dtrucs committed Sep 16, 2024
1 parent 468292b commit 20602ae
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export const BurgerMenuSection: React.FC<Props> = ({
const closeIcon = <Minus size={24} aria-hidden />;
const { openState, setOpenState } = useBurgerMenuSection();
const updatePanelState = (openPanelIds: string[]) => {
openPanelIds.length > 0 ? setOpenState('OPENED') : setOpenState('CLOSED');
setOpenState(openPanelIds.length > 0 ? 'OPENED' : 'CLOSED');
};
if (!items && !languages) {
return <a className={cn(classNameTitle, classNameBorder)}>{title}</a>;
Expand Down

0 comments on commit 20602ae

Please sign in to comment.