mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-04-11 22:40:27 +00:00
queryParams fixed
This commit is contained in:
parent
d96573b8d9
commit
e204b2f7f0
1 changed files with 2 additions and 3 deletions
|
|
@ -12,16 +12,15 @@ const useSelectedAddon = (transportUrl) => {
|
|||
return;
|
||||
}
|
||||
|
||||
fetch(transportUrl) // todo
|
||||
fetch(transportUrl) // TODO
|
||||
.then((resp) => resp.json())
|
||||
.then((manifest) => setAddon({ manifest, transportUrl, flags: {} }));
|
||||
}, [transportUrl]);
|
||||
const clear = React.useCallback(() => {
|
||||
if (active) {
|
||||
const { pathname, search } = UrlUtils.parse(locationHash.slice(1));
|
||||
const queryParams = new URLSearchParams(search);
|
||||
const queryParams = new URLSearchParams(search || '');
|
||||
queryParams.delete('addon');
|
||||
queryParams.delete('null');
|
||||
if ([...queryParams].length !== 0) {
|
||||
window.location.replace(`#${pathname}?${queryParams.toString()}`);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue