Skip to content

Commit

Permalink
Merge pull request #32 from kopax/patch-1
Browse files Browse the repository at this point in the history
Fix: event listeners
  • Loading branch information
pasqualevitiello authored Jan 2, 2021
2 parents 7a69d3a + f8c52fb commit d5a9766
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/layout/Header.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const Header = ({
document.addEventListener('click', clickOutside);
return () => {
document.removeEventListener('keydown', keyPress);
document.addEventListener('click', clickOutside);
document.removeEventListener('click', clickOutside);
closeMenu();
};
});
Expand Down Expand Up @@ -135,4 +135,4 @@ const Header = ({
Header.propTypes = propTypes;
Header.defaultProps = defaultProps;

export default Header;
export default Header;

0 comments on commit d5a9766

Please sign in to comment.