diff --git a/src/components/sections/CampaignsSection.tsx b/src/components/sections/CampaignsSection.tsx new file mode 100644 index 0000000..5bfb673 --- /dev/null +++ b/src/components/sections/CampaignsSection.tsx @@ -0,0 +1,54 @@ +'use client' + +import { useEmDashContent } from '@/hooks/useEmDashContent' +import Image from 'next/image' +import { Leaf } from 'lucide-react' +import Button from '@/components/ui/Button' + +export default function CampaignsSection() { + const { items, loading } = useEmDashContent('campaigns') + + if (loading) { + return ( +
+
+
+ ) + } + + if (items.length === 0) return null + + return ( +
+
+

Campagne Stagionali

+
+ {items.map((item) => { + const d = item.data as { title?: string; headline?: string; body?: string; cta_text?: string; image?: string } + return ( +
+ {d.image && ( +
+ {d.title +
+ )} +
+
+ +

{d.title || d.headline}

+
+

{d.body}

+ {d.cta_text && ( + + )} +
+
+ ) + })} +
+
+
+ ) +} \ No newline at end of file