mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-03-11 21:27:05 +00:00
replace location when filters in library changed
This commit is contained in:
parent
bb6095f669
commit
33b6bb0290
1 changed files with 2 additions and 2 deletions
|
|
@ -62,11 +62,11 @@ const useLibrary = (type, sort) => {
|
|||
if (name === 'type') {
|
||||
const nextQuery = new URLSearchParams({ sort: typeof sort === 'string' ? sort : '' });
|
||||
const nextType = typeof value === 'string' ? value : '';
|
||||
window.location = `#/library/${nextType}?${nextQuery}`;
|
||||
window.location.replace(`#/library/${nextType}?${nextQuery}`);
|
||||
} else if (name === 'sort') {
|
||||
const nextQuery = new URLSearchParams({ sort: typeof value === 'string' ? value : '' });
|
||||
const nextType = typeof type === 'string' ? type : '';
|
||||
window.location = `#/library/${nextType}?${nextQuery}`;
|
||||
window.location.replace(`#/library/${nextType}?${nextQuery}`);
|
||||
}
|
||||
}, [type, sort]);
|
||||
const typeDropdown = React.useMemo(() => {
|
||||
|
|
|
|||
Loading…
Reference in a new issue