fix: tab selection on overview.

This commit is contained in:
Darshan
2025-06-18 12:27:15 +05:30
parent 9b4e180f94
commit 2a8f3893ea
@@ -20,7 +20,7 @@
import { onMount, setContext, type Component } from 'svelte';
import Bandwidth from './bandwidth.svelte';
import Requests from './requests.svelte';
import { usage } from './store';
import { selectedTab, usage } from './store';
import { formatNum } from '$lib/helpers/string';
import { periodToDates } from '$lib/layout/usage.svelte';
import { canWriteProjects } from '$lib/stores/roles';
@@ -52,7 +52,7 @@
}
function isTabSelected(key: string) {
return page.url.pathname === `${path}/${key}`;
return $selectedTab === key;
}
$: $registerCommands([