feat: Implement dynamic city and state retrieval and display for profiles, utilizing new data mapping and updated UI logic.
This commit is contained in:
@@ -81,6 +81,8 @@ const defaultProfileCardData: ProfileCardData = {
|
||||
bio: '',
|
||||
expertise: [],
|
||||
serviceAreas: [],
|
||||
city: null,
|
||||
state: null,
|
||||
};
|
||||
|
||||
// Default availability data when no field values are available
|
||||
@@ -316,7 +318,11 @@ export default function AgentDashboard() {
|
||||
lastName={agentProfile.lastName}
|
||||
isVerified={agentProfile.isVerified}
|
||||
title={agentProfile.agentType?.name || 'Real Estate Agent'}
|
||||
location={profileCardData.serviceAreas?.[0] || (agentProfile as unknown as { city?: string }).city || 'United States'}
|
||||
location={
|
||||
profileCardData.city && profileCardData.state
|
||||
? `${profileCardData.city}, ${profileCardData.state}`
|
||||
: profileCardData.city || profileCardData.state || profileCardData.serviceAreas?.[0] || 'United States'
|
||||
}
|
||||
memberSince={formatMemberSince((agentProfile as unknown as { createdAt?: string }).createdAt)}
|
||||
bio={profileCardData.bio || agentProfile.bio || ''}
|
||||
expertise={profileCardData.expertise}
|
||||
|
||||
Reference in New Issue
Block a user