Refactor URL update logic to use router.replace for tab changes in Personal and LibraryManagement components

This commit is contained in:
zurdi
2025-11-19 17:02:45 +00:00
parent ae87a77075
commit e23f2ca04c
2 changed files with 2 additions and 8 deletions

View File

@@ -39,7 +39,7 @@ const publicNotes =
// Watch for sub-tab changes and update URL
watch(tab, (newSubTab) => {
router.push({
router.replace({
path: route.path,
query: {
...route.query,

View File

@@ -165,19 +165,13 @@ const { y: documentY } = useScroll(document.body, { throttle: 500 });
// Watch for tab changes and update URL
watch(tab, (newTab) => {
router.push({
router.replace({
path: route.path,
query: {
...route.query,
tab: newTab,
},
});
// Fetch ROMs when switching to missing tab
if (newTab === "missing") {
resetMissingRoms();
fetchRoms();
}
});
// Watch for URL changes and update tab