mirror of
https://github.com/imputnet/cobalt.git
synced 2024-12-29 11:06:10 +00:00
web/sidebar: highlight the category tab even on subpages
This commit is contained in:
parent
eb12fa631b
commit
e305c99b94
|
@ -13,7 +13,10 @@
|
|||
|
||||
let tab: HTMLElement;
|
||||
|
||||
$: isTabActive = $page.url.pathname === tabLink;
|
||||
$: currentTab = $page.url.pathname.split('/')[1];
|
||||
$: baseTabPath = tabLink.split('/')[1]
|
||||
|
||||
$: isTabActive = currentTab === baseTabPath;
|
||||
|
||||
const showTab = (e: HTMLElement | undefined) => {
|
||||
if (e) {
|
||||
|
|
Loading…
Reference in a new issue