Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion components/navigation/MobileNavigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -757,7 +757,15 @@ export default function MobileNavigation() {
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<div className="flex justify-center items-center space-x-0">
{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 (
Expand Down