diff --git a/src/lib/components/Navigation.svelte b/src/lib/components/Navigation.svelte index 16ccc77c..80e99e29 100644 --- a/src/lib/components/Navigation.svelte +++ b/src/lib/components/Navigation.svelte @@ -41,7 +41,9 @@ // Localized links const galleryHref = $derived(localizeHref('/teams/explore')) const guidesHref = $derived(localizeHref('/guides')) - const collectionHref = $derived(localizeHref('/collection')) + const collectionHref = $derived( + username ? localizeHref(`/${username}/collection/characters`) : localizeHref('/collection') + ) const meHref = $derived(localizeHref('/me')) const loginHref = $derived(localizeHref('/auth/login')) const registerHref = $derived(localizeHref('/auth/register')) @@ -101,6 +103,11 @@ return path === href } + // For collection, check if we're on any collection page + if (href === collectionHref) { + return path.includes('/collection') + } + // Exact match or starts with href + / return path === href || path.startsWith(href + '/') }