fix: always use explicit tab path in URL

This commit is contained in:
Justin Edmund 2025-12-01 04:36:17 -08:00
parent 5063e8e73c
commit 21bda28910

View file

@ -281,8 +281,9 @@
function handleTabChange(tab: GridType) {
// Update URL (adds to browser history)
// activeTab is derived from URL params, so it will update automatically
// Always use explicit tab path (e.g., /weapons not just /) to ensure navigation triggers
const basePath = `/teams/${party.shortcode}`
const newPath = tab === GridType.Weapon ? basePath : `${basePath}/${tab}s`
const newPath = `${basePath}/${tab}s`
goto(newPath, { noScroll: true, keepFocus: true })
// Update selectedSlot to the first valid empty slot for this tab