diff --git a/src/components/Navbar.tsx b/src/components/Navbar.tsx index 0049cdb..387f9c2 100644 --- a/src/components/Navbar.tsx +++ b/src/components/Navbar.tsx @@ -327,7 +327,7 @@ export default function Navbar({
{/* Navigation Items based on page type */} {navigationItems.map((item) => ( @@ -365,7 +365,7 @@ export default function Navbar({ /> ))} - +
{/* Right Section */} @@ -373,36 +373,35 @@ export default function Navbar({ {/* City Dropdown */} { - console.log('City dropdown toggled'); - // Add a small delay to prevent rapid state changes - setTimeout(() => { - setActiveCityDropdown(!activeCityDropdown); - }, 50); - }} - items={cities.map(city => ({ - id: 'city-change', - label: city.label, - action: () => { - console.log('City action called:', city.id); - handleCityChange(city.id); - } - }))} - title="Select City" - trigger={ -
- - {isLandingPage - ? 'Select City' - : activeCity.charAt(0).toUpperCase() + activeCity.slice(1) - } - - -
- } - /> + ref={cityRef} + isOpen={activeCityDropdown} + onToggle={() => { + console.log('City dropdown toggled'); + setTimeout(() => { + setActiveCityDropdown(!activeCityDropdown); + }, 50); + }} + items={cities.map(city => ({ + id: 'city-change', + label: city.label, + action: () => { + console.log('City action called:', city.id); + handleCityChange(city.id); + } + }))} + title="Select City" + trigger={ +
+ + {isLandingPage || activeCity === 'Landingpage' || !activeCity + ? 'Select City' + : activeCity.charAt(0).toUpperCase() + activeCity.slice(1) + } + + +
+ } +/> {/* Language Dropdown */} = ({ return (