diff --git a/src/routes/(console)/organization-[organization]/header.svelte b/src/routes/(console)/organization-[organization]/header.svelte index 6c061f4ed..bee47c8f3 100644 --- a/src/routes/(console)/organization-[organization]/header.svelte +++ b/src/routes/(console)/organization-[organization]/header.svelte @@ -90,15 +90,21 @@ const avatars = $derived($members.memberships?.map((m) => m.userName || m.userEmail) ?? []); - const titleName = $derived(resolvedProfile.minimalOrgHeader ? 'Billing' : organization?.name); + const titleName = $derived.by(() => { + if (!resolvedProfile.minimalOrgHeader) { + return organization?.name; + } - const blockSize = $derived(resolvedProfile.minimalOrgHeader ? 'unset' : '152px'); + const currentPath = page.url.pathname; + const matchedTab = tabs.find((tab) => isTabSelected(tab, currentPath, path, tabs)); + return matchedTab?.title ?? organization?.name ?? 'Organization'; + }); const shouldShowCover = $derived(resolvedProfile.minimalOrgHeader ? true : organization.$id); {#if shouldShowCover} - + @@ -160,7 +166,11 @@ - {#if !resolvedProfile.minimalOrgHeader} + {#if resolvedProfile.minimalOrgHeader} + + Overview + + {:else} {#each tabs as tab}