mirror of
https://github.com/TeamPiped/Piped.git
synced 2025-08-09 20:24:09 +00:00
Use replaceState
and simplify updating search params
This commit is contained in:
@@ -224,7 +224,11 @@ export default {
|
||||
},
|
||||
loadTab(index) {
|
||||
this.selectedTab = index;
|
||||
this.appendQueryToUrl("tab", this.tabs[index].name ?? "videos");
|
||||
|
||||
// update the tab query in the url path
|
||||
const url = new URL(window.location);
|
||||
url.searchParams.set("tab", this.tabs[index].name ?? "videos");
|
||||
window.history.replaceState(window.history.state, "", url);
|
||||
|
||||
if (index == 0) {
|
||||
this.contentItems = this.channel.relatedStreams;
|
||||
|
Reference in New Issue
Block a user