diff --git a/src/app/dashboard/cms/page.tsx b/src/app/dashboard/cms/page.tsx index 7583b4b..769cf81 100644 --- a/src/app/dashboard/cms/page.tsx +++ b/src/app/dashboard/cms/page.tsx @@ -24,7 +24,7 @@ import { AboutFeaturesContent, AboutFeatureItem, AboutTeamContent, - AboutTeamMember, + AboutTeamCard, AboutCtaContent, FaqContent, FaqCategoryItem, @@ -97,7 +97,7 @@ function defaultContentFor(pageSlug: string, sectionKey: string): unknown { case 'hero': return { badge: '', headline: '', description: '', ctaButtonText: '', bannerImageUrl: '', bannerOverlayText: '' } as AboutHeroContent; case 'stats': return { stats: [] } as AboutStatsContent; case 'features': return { badge: '', features: [] } as AboutFeaturesContent; - case 'team': return { title: '', subtitle: '', members: [] } as AboutTeamContent; + case 'team': return { title: '', subtitle: '', intro: '', cards: [] } as AboutTeamContent; case 'cta': return { title: '', description: '', buttonText: '' } as AboutCtaContent; } } @@ -1132,40 +1132,48 @@ export default function CmsPage() { } function renderAboutTeamForm() { - const data = editContent as AboutTeamContent; + const dataRaw = editContent as AboutTeamContent & { members?: unknown }; + const data: AboutTeamContent = { + title: dataRaw.title ?? '', + subtitle: dataRaw.subtitle ?? '', + intro: dataRaw.intro ?? '', + cards: Array.isArray(dataRaw.cards) ? dataRaw.cards : [], + }; const update = (patch: Partial) => setEditContent({ ...data, ...patch }); - function updateMember(index: number, patch: Partial) { - const members = [...data.members]; - members[index] = { ...members[index], ...patch }; - update({ members }); + function updateCard(index: number, patch: Partial) { + const cards = [...data.cards]; + cards[index] = { ...cards[index], ...patch }; + update({ cards }); } return (
- update({ title: e.target.value })} placeholder="e.g. Meet the minds behind the platform." /> + update({ title: e.target.value })} placeholder="e.g. For Real Estate Professionals." />
-