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