From 64d422ddd8db077c4ef8c71ca0e0b4f180db8ff0 Mon Sep 17 00:00:00 2001 From: Rahaf Date: Tue, 16 Jun 2026 15:18:29 +0300 Subject: [PATCH] Hide rent-type fields on buy/sell tabs and disable auto-search on tab click - Property type and rent period fields now only display when 'Rent' tab is active - Adjusted grid column spans to fill layout when fields are hidden - Tab switching no longer triggers an automatic search; search runs only on button click --- app/components/home/HeroSearch.js | 98 ++++++++++++++++--------------- 1 file changed, 50 insertions(+), 48 deletions(-) diff --git a/app/components/home/HeroSearch.js b/app/components/home/HeroSearch.js index ff6d0c4..ffe10ea 100644 --- a/app/components/home/HeroSearch.js +++ b/app/components/home/HeroSearch.js @@ -67,9 +67,7 @@ export default function HeroSearch({ onSearch, isAuthenticated }) { setActiveTab(tab); if ((tab === 'rent' || tab === 'sell') && !isAuthenticated) { setShowLoginDialog(true); - return; } - handleSearch(); }; const handleSearch = () => { @@ -139,30 +137,32 @@ export default function HeroSearch({ onSearch, isAuthenticated }) { ))} -
- - -
+ {activeTab === 'rent' && ( +
+ + +
+ )}