Skip to content

Commit

Permalink
fix: prevent mobile menu from immediately closing on click
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaHungDinh committed Oct 2, 2024
1 parent d4084a7 commit 71b4b9d
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,10 @@ const MobileMenu = ({children}) => {
className={`give-donor-dashboard-mobile-menu__toggle ${
isOpen ? 'give-donor-dashboard-mobile-menu__toggle--toggled' : ''
}`}
onClick={() => setIsOpen(!isOpen)}
onClick={(event) => {
event.stopPropagation();
setIsOpen(!isOpen);
}}
>
<FontAwesomeIcon icon="bars" />
</div>
Expand Down

0 comments on commit 71b4b9d

Please sign in to comment.