mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-03-11 21:27:05 +00:00
push search location on submit new query
This commit is contained in:
parent
297b7e2ff5
commit
c9b5792675
1 changed files with 2 additions and 1 deletions
|
|
@ -17,7 +17,8 @@ const SearchBar = ({ className, query, active }) => {
|
|||
}, [active]);
|
||||
const queryInputOnSubmit = React.useCallback(() => {
|
||||
if (searchInputRef.current !== null) {
|
||||
window.location.replace(`#/search?search=${searchInputRef.current.value}`);
|
||||
const queryParams = new URLSearchParams([['search', searchInputRef.current.value]]);
|
||||
window.location = `#/search?${queryParams.toString()}`;
|
||||
}
|
||||
}, []);
|
||||
React.useEffect(() => {
|
||||
|
|
|
|||
Loading…
Reference in a new issue