mirror of
https://github.com/aljazceru/hypergolic.git
synced 2026-01-23 23:34:28 +01:00
problem: menu highlight doesn't work properly
This commit is contained in:
@@ -7,9 +7,8 @@
|
||||
|
||||
let iconClass = 'h-5 w-5 md:h-4 md:w-4';
|
||||
|
||||
let getClass = (menuItem: string) => {
|
||||
//todo: make this re-run any time our path changes
|
||||
if ($page.url.pathname.includes(menuItem)) {
|
||||
$: getClass = (menuItem: string) => {
|
||||
if ($page.url.pathname.startsWith(`/${menuItem}`)) {
|
||||
return 'flex items-center gap-3 rounded-lg bg-muted px-3 py-2 text-primary transition-all hover:text-primary';
|
||||
} else {
|
||||
return 'flex items-center gap-3 rounded-lg px-3 py-2 text-muted-foreground transition-all hover:text-primary';
|
||||
|
||||
Reference in New Issue
Block a user