mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-03-11 21:27:05 +00:00
push to history stack instead of replace in Library and Discover
This commit is contained in:
parent
76aa4b3b0b
commit
9764ec459a
2 changed files with 3 additions and 3 deletions
|
|
@ -12,7 +12,7 @@ const navigateWithRequest = (request) => {
|
|||
const type = encodeURIComponent(request.path.type_name);
|
||||
const catalogId = encodeURIComponent(request.path.id);
|
||||
const extra = new URLSearchParams(request.path.extra).toString();
|
||||
window.location.replace(`#/discover/${transportUrl}/${type}/${catalogId}?${extra}`);
|
||||
window.location = `#/discover/${transportUrl}/${type}/${catalogId}?${extra}`;
|
||||
};
|
||||
|
||||
const nextExtra = (prevExtra, extraProp, extraValue) => {
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ const mapSelectableInputs = (route, library) => {
|
|||
onSelect: (event) => {
|
||||
const type = JSON.parse(event.value);
|
||||
const queryParams = new URLSearchParams(library.selected !== null ? [['sort', library.selected.sort]] : []);
|
||||
window.location.replace(`#/${route}${type !== null ? `/${encodeURIComponent(type)}` : ''}?${queryParams.toString()}`);
|
||||
window.location = `#/${route}${type !== null ? `/${encodeURIComponent(type)}` : ''}?${queryParams.toString()}`;
|
||||
}
|
||||
};
|
||||
const sortSelect = {
|
||||
|
|
@ -31,7 +31,7 @@ const mapSelectableInputs = (route, library) => {
|
|||
onSelect: (event) => {
|
||||
const type = library.selected !== null ? library.selected.type_name : null;
|
||||
const queryParams = new URLSearchParams([['sort', event.value]]);
|
||||
window.location.replace(`#/${route}${type !== null ? `/${encodeURIComponent(type)}` : ''}?${queryParams.toString()}`);
|
||||
window.location = `#/${route}${type !== null ? `/${encodeURIComponent(type)}` : ''}?${queryParams.toString()}`;
|
||||
}
|
||||
};
|
||||
return [typeSelect, sortSelect];
|
||||
|
|
|
|||
Loading…
Reference in a new issue