fix: nav links in side menu

This commit is contained in:
Mahyar Khanbolooki
2025-07-31 19:54:21 +03:30
parent 7d527ec24f
commit 63a38b56f8
+3 -2
View File
@@ -145,12 +145,13 @@ function SideMenu({ menuState, toggleMenuState, nightModeState, togglenightModeS
{menuItems[0]
.filter(item => !item.auth || (item.auth && userIsAuthenticated))
.map((item, index) => {
const isActive = pathname === `/${name}/${item.href}`;
const href = `/${name}/${item.href}`;
const isActive = pathname === href;
return (
<li key={index} className="mt-[18px]">
<SideMenuItem
className={clsx(isActive && 'text-foreground!')}
href={item.href ?? ''}
href={href ?? ''}
title={tMenu(item.title)}
onClick={
typeof item.href === 'string'