Skip to content

Commit

Permalink
fix clear search on route changes
Browse files Browse the repository at this point in the history
  • Loading branch information
isstuev committed Oct 1, 2024
1 parent 10e5e93 commit 415fc0f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ui/snippets/searchBar/SearchBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ const SearchBar = ({ isHomepage }: Props) => {
React.useEffect(() => {
handleSearchTermChange('');
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [ router.pathname ]);
}, [ router.asPath.split('?')[0] ]);

React.useEffect(() => {
const inputEl = inputRef.current;
Expand Down

0 comments on commit 415fc0f

Please sign in to comment.