mirror of
https://github.com/rommapp/romm.git
synced 2026-02-18 23:42:07 +01:00
Refactor URL update logic to use router.replace for tab changes in Personal and LibraryManagement components
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user