feat: include agent IDs in ProfessionalItem and FeaturedAgentItem interfaces and dashboard updates

This commit is contained in:
pradeepkumar
2026-04-20 10:32:00 +05:30
parent 27854fc6e8
commit 53c08cd56a
2 changed files with 4 additions and 2 deletions

View File

@@ -326,7 +326,7 @@ export default function CmsPage() {
}
}
const newItem: ProfessionalItem = { name, subtitle, location, experience, expertise, imageUrl };
const newItem: ProfessionalItem = { id: agent?.id, name, subtitle, location, experience, expertise, imageUrl };
onChange([...currentItems, newItem]);
setAgentSearchQuery('');
setAgentSearchResults([]);
@@ -383,7 +383,7 @@ export default function CmsPage() {
}
}
const newAgent: FeaturedAgentItem = { name, role, rating, location, experience, imageUrl };
const newAgent: FeaturedAgentItem = { id: agent?.id, name, role, rating, location, experience, imageUrl };
setEditContent({ ...data, featuredAgents: [...(data.featuredAgents || []), newAgent] });
setAgentSearchQuery('');
setAgentSearchResults([]);

View File

@@ -15,6 +15,7 @@ export interface FeatureItem {
}
export interface FeaturedAgentItem {
id?: string;
name: string;
role: string;
rating: string;
@@ -31,6 +32,7 @@ export interface FeaturesContent {
}
export interface ProfessionalItem {
id?: string;
name: string;
subtitle: string;
location: string;