fix: Use parse_request hook for /admin + Dashboard menu now active on Overview (root path)
This commit is contained in:
@@ -86,7 +86,9 @@ function ActiveNavLink({ to, startsWith, children, className, end }: any) {
|
||||
to={to}
|
||||
end={end}
|
||||
className={(nav) => {
|
||||
const activeByPath = starts ? location.pathname.startsWith(starts) : false;
|
||||
// Special case: Dashboard should also match root path "/"
|
||||
const isDashboard = starts === '/dashboard' && location.pathname === '/';
|
||||
const activeByPath = starts ? (location.pathname.startsWith(starts) || isDashboard) : false;
|
||||
const mergedActive = nav.isActive || activeByPath;
|
||||
if (typeof className === 'function') {
|
||||
// Preserve caller pattern: className receives { isActive }
|
||||
|
||||
Reference in New Issue
Block a user