feat: include agent IDs in ProfessionalItem and FeaturedAgentItem interfaces and dashboard updates
This commit is contained in:
@@ -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([]);
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user