'use client'; import { useState, useEffect } from 'react'; import { HeroSection } from '@/components/home/HeroSection'; import { FeaturesSection } from '@/components/home/FeaturesSection'; import { TopProfessionals } from '@/components/home/TopProfessionals'; import { TestimonialsSection } from '@/components/home/TestimonialsSection'; import { cmsService } from '@/services/cms.service'; import type { HeroContent, FeaturesContent, TopProfessionalsContent, TestimonialsContent, CmsContentRecord } from '@/types/cms'; export default function UserDashboard() { const [cmsData, setCmsData] = useState>({}); useEffect(() => { const fetchCms = async () => { const sections = await cmsService.getPageContent('landing'); const data: Record = {}; sections.forEach((s: CmsContentRecord) => { data[s.sectionKey] = s.content; }); setCmsData(data); }; fetchCms(); }, []); return (
); }