feat: use router.replace for project filters to prevent history pollution (#5378)
* fix(navigation): use replaceState for project filters to prevent history pollution * fix: add replace prop to NavTabs and enable it on project and discover pages * style: run pnpm run fix on affected files * enable NavTabs replace prop on collection, user, and org pages --------- Co-authored-by: Calum H. (IMB11) <contact@cal.engineer>
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
v-show="link.shown ?? true"
|
||||
:key="link.href"
|
||||
ref="tabLinkElements"
|
||||
:replace="replace"
|
||||
:to="query ? (link.href ? `?${query}=${link.href}` : '?') : link.href"
|
||||
class="button-animation z-[1] flex flex-row items-center gap-2 px-4 py-2 focus:rounded-full"
|
||||
:class="getSSRFallbackClasses(index)"
|
||||
@@ -71,6 +72,7 @@ interface Tab {
|
||||
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
replace?: boolean
|
||||
links: Tab[]
|
||||
query?: string
|
||||
mode?: 'navigation' | 'local'
|
||||
|
||||
Reference in New Issue
Block a user