Skip to content

Commit

Permalink
Lint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Oksydan committed Oct 9, 2023
1 parent e8799a4 commit bc6dd1c
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions _dev/js/theme/components/useTopMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ const useTopMenu = (selector) => {
};
const ITEM_ACTIVE = 'main-menu__item--active';


const toggleSubMenu = (e) => {
const { currentTarget } = e;
const { SUB_MENU } = DOM_SELECTORS;
Expand All @@ -24,23 +23,21 @@ const useTopMenu = (selector) => {

subMenu.setAttribute('aria-hidden', isExpanded);
subMenu.setAttribute('aria-expanded', !isExpanded);

}
}
};

const init = () => {
debugger
const { SUB_ELEMENTS } = DOM_SELECTORS;

off(menuElement, 'mouseenter', SUB_ELEMENTS, toggleSubMenu);
off(menuElement, 'mouseleave', SUB_ELEMENTS, toggleSubMenu);
on(menuElement, 'mouseenter', SUB_ELEMENTS, toggleSubMenu);
on(menuElement, 'mouseleave', SUB_ELEMENTS, toggleSubMenu);
}
};

return {
init
}
}
init,
};
};

export default useTopMenu;

0 comments on commit bc6dd1c

Please sign in to comment.