Commit 257e5e20 authored by isstuev's avatar isstuev

fix clear search on route changes

parent 10e5e934
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment