From 6b5256978e529a8a9fe62ff7b7f1cd52a18c96d6 Mon Sep 17 00:00:00 2001 From: pradeepkumar Date: Mon, 23 Mar 2026 11:25:23 +0530 Subject: [PATCH] feat: Implement featured agents section within the CMS features management interface. --- src/app/dashboard/cms/page.tsx | 100 ++++++++++++++++++++++++++------- src/services/cms.service.ts | 10 ++++ src/services/index.ts | 1 + 3 files changed, 91 insertions(+), 20 deletions(-) diff --git a/src/app/dashboard/cms/page.tsx b/src/app/dashboard/cms/page.tsx index 7970071..f616949 100644 --- a/src/app/dashboard/cms/page.tsx +++ b/src/app/dashboard/cms/page.tsx @@ -11,6 +11,7 @@ import { HeroContent, FeaturesContent, FeatureItem, + FeaturedAgentItem, TopProfessionalsContent, ProfessionalItem, TestimonialsContent, @@ -74,7 +75,11 @@ function defaultHero(): HeroContent { } function defaultFeatures(): FeaturesContent { - return { title: '', subtitle: '', features: [] }; + return { title: '', subtitle: '', features: [], featuredAgents: [] }; +} + +function emptyFeaturedAgent(): FeaturedAgentItem { + return { name: '', role: '', rating: '', location: '', experience: '', imageUrl: '' }; } function defaultTopProfessionals(): TopProfessionalsContent { @@ -158,6 +163,7 @@ export default function CmsPage() { const [isSubmitting, setIsSubmitting] = useState(false); const [modalError, setModalError] = useState(''); const [professionalsTab, setProfessionalsTab] = useState<'agents' | 'lenders'>('agents'); + const [featuresTab, setFeaturesTab] = useState<'features' | 'agents'>('features'); const [isUploadingImage, setIsUploadingImage] = useState(false); // Agent search @@ -389,26 +395,80 @@ export default function CmsPage() { update({ subtitle: e.target.value })} placeholder="Section subtitle" /> -
-
- - -
- {data.features.length === 0 &&

No features added yet.

} -
- {data.features.map((feat, idx) => ( -
-
- Feature {idx + 1} - -
- {renderImageUploadField('Icon', feat.iconPath, (url) => updateFeature(idx, { iconPath: url }))} - updateFeature(idx, { title: e.target.value })} placeholder="Feature title" /> -