Skip to content

Commit

Permalink
fix(Quicksearch): DO not open the quicksearch on every page
Browse files Browse the repository at this point in the history
  • Loading branch information
qgerome committed Oct 12, 2022
1 parent 997341a commit a66f9ee
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/catalog/features/Quicksearch/Quicksearch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,11 @@ const Quicksearch = (props: QuicksearchProps) => {
});

useEffect(() => {
onClose();
}, [router.pathname, onClose]);
if (open) {
onClose();
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [router.pathname, open]);

useEffect(() => {
if (!open) {
Expand Down

0 comments on commit a66f9ee

Please sign in to comment.