diff --git a/src/app/(agent)/agent/settings/page.tsx b/src/app/(agent)/agent/settings/page.tsx index 9ef5ac2..434d30b 100644 --- a/src/app/(agent)/agent/settings/page.tsx +++ b/src/app/(agent)/agent/settings/page.tsx @@ -9,7 +9,6 @@ export default function ProfileSettingsPage() { career: string; email: string; phone: string; - location: string; }) => { console.log('Saving agent profile settings:', data); }; diff --git a/src/app/(user)/user/settings/page.tsx b/src/app/(user)/user/settings/page.tsx index bc08b7d..97fc5e8 100644 --- a/src/app/(user)/user/settings/page.tsx +++ b/src/app/(user)/user/settings/page.tsx @@ -9,7 +9,6 @@ export default function UserProfileSettingsPage() { career: string; email: string; phone: string; - location: string; }) => { console.log('Saving user profile settings:', data); }; diff --git a/src/components/settings/ProfileSettingsForm.tsx b/src/components/settings/ProfileSettingsForm.tsx index 5482459..a18a54e 100644 --- a/src/components/settings/ProfileSettingsForm.tsx +++ b/src/components/settings/ProfileSettingsForm.tsx @@ -14,7 +14,6 @@ interface ProfileSettingsFormProps { career: string; email: string; phone: string; - location: string; avatar?: string; }; onSave?: (data: { @@ -23,7 +22,6 @@ interface ProfileSettingsFormProps { career: string; email: string; phone: string; - location: string; }) => void; descriptionText?: string; } @@ -42,7 +40,6 @@ export function ProfileSettingsForm({ career: initialData?.career || '', email: initialData?.email || '', phone: initialData?.phone || '', - location: initialData?.location || '', }); const [avatarUrl, setAvatarUrl] = useState(null); @@ -81,7 +78,6 @@ export function ProfileSettingsForm({ career: profile.headline || profile.agentType?.name || 'Real Estate Agent', email: profile.email || session?.user?.email || '', phone: profile.phone || '', - location: [profile.state, profile.city, profile.country].filter(Boolean).join(', '), }; setFormData(profileData); setOriginalData(profileData); // Store original for cancel @@ -102,7 +98,6 @@ export function ProfileSettingsForm({ career: '', // Users don't have career/agent type email: profile.email || session?.user?.email || '', phone: profile.phone || '', - location: [profile.state, profile.city, profile.country].filter(Boolean).join(', '), }; setFormData(profileData); setOriginalData(profileData); // Store original for cancel @@ -287,27 +282,18 @@ export function ProfileSettingsForm({ const role = (session?.user as any)?.role; // Update profile based on role (email is not editable - tied to auth) - // Parse location into state, city, country (display order is state first) - const locationParts = formData.location.split(',').map(s => s.trim()); - if (role === 'AGENT') { await agentsService.updateProfile({ firstName: formData.firstName, lastName: formData.lastName, phone: formData.phone, headline: formData.career, - state: locationParts[0] || '', - city: locationParts[1] || '', - country: locationParts[2] || '', }); } else { await usersService.updateProfile({ firstName: formData.firstName, lastName: formData.lastName, phone: formData.phone, - state: locationParts[0] || undefined, - city: locationParts[1] || undefined, - country: locationParts[2] || undefined, }); } @@ -496,28 +482,6 @@ export function ProfileSettingsForm({ - {/* Row 3: Location */} -
- -
-
- Location -
- handleChange('location', e.target.value)} - className="w-full sm:w-1/2 h-[44px] pl-10 pr-4 border border-[#00293D]/20 rounded-[10px] text-[14px] font-serif text-[#00293D] focus:outline-none focus:border-[#E58625]" - /> -
-
{/* Action Buttons */}