diff --git a/components/navigation/MobileNavigation.tsx b/components/navigation/MobileNavigation.tsx index 4c02622..3c83477 100644 --- a/components/navigation/MobileNavigation.tsx +++ b/components/navigation/MobileNavigation.tsx @@ -757,7 +757,15 @@ export default function MobileNavigation() {
{desktopNav.mainMenuItems.map((item) => { - const isActive = item.href && (item.href === '/' ? pathname === '/' : pathname.startsWith(item.href)); + const isActive = item.href && (item.href === '/' ? pathname === '/' : (() => { + if (pathname.startsWith('/discover/property/')) { + if (contextParam === 'engage' && item.href === '/engage') return true; + if (contextParam === 'buybox' && item.href === '/discover') return true; + if (!contextParam && item.href === '/discover') return true; + return false; + } + return pathname.startsWith(item.href); + })()); const isSubmenuOpen = openSubmenus[item.name]; return (