From a1c128ea2fd9468128a7c6f9ba656162aee80142 Mon Sep 17 00:00:00 2001 From: pradeepkumar Date: Wed, 4 Mar 2026 22:13:14 +0530 Subject: [PATCH] feat: Enhance user profiles page filter synchronization and refactor common header navigation to use Link components. --- src/app/(user)/user/profiles/page.tsx | 22 ++++++++++++++++++++-- src/components/layout/CommonHeader.tsx | 11 +++++------ 2 files changed, 25 insertions(+), 8 deletions(-) diff --git a/src/app/(user)/user/profiles/page.tsx b/src/app/(user)/user/profiles/page.tsx index ad497c0..7fee1f2 100644 --- a/src/app/(user)/user/profiles/page.tsx +++ b/src/app/(user)/user/profiles/page.tsx @@ -534,6 +534,24 @@ function ProfilesPageContent() { const handleTypeChange = (typeId: string | null) => { setActiveTypeId(typeId); setCurrentPage(1); + // Sync listing type sidebar with agent type tab selection + if (typeId) { + const matchedType = agentTypes.find(t => t.id === typeId); + if (matchedType?.name === 'Lender') { + setListingType('lenders'); + } else { + setListingType('agents'); + } + } + }; + + const handleListingTypeChange = (type: 'agents' | 'lenders') => { + setListingType(type); + // Map listing type to the corresponding agent type and filter + const typeName = type === 'agents' ? 'Professional' : 'Lender'; + const matchedType = agentTypes.find(t => t.name === typeName); + setActiveTypeId(matchedType?.id || null); + setCurrentPage(1); }; // Get filter field by slug for sidebar @@ -555,14 +573,14 @@ function ProfilesPageContent() {

Listing Type

+ {/* Profile Section with Greeting - Entire area clickable */}