From 18df9356bb7ed94e1161e8e4876969c9e34b6589 Mon Sep 17 00:00:00 2001 From: Vula Builder Date: Tue, 28 Jul 2026 12:39:44 +0000 Subject: [PATCH] Deploy --- .../sections/HarvestPromoCampaignSection.tsx | 72 +++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 src/components/sections/HarvestPromoCampaignSection.tsx diff --git a/src/components/sections/HarvestPromoCampaignSection.tsx b/src/components/sections/HarvestPromoCampaignSection.tsx new file mode 100644 index 0000000..3e56248 --- /dev/null +++ b/src/components/sections/HarvestPromoCampaignSection.tsx @@ -0,0 +1,72 @@ +'use client' + +import { useState } from 'react' +import { useVulaContent } from '@/hooks/useVulaContent' +import Image from 'next/image' +import Link from 'next/link' +import Button from '@/components/ui/Button' +import Badge from '@/components/ui/Badge' + +export default function HarvestPromoCampaignSection() { + const { items, loading } = useVulaContent('campaigns') + const [activeIndex, setActiveIndex] = useState(0) + + if (loading) return
+ if (items.length === 0) return null + + // Ensure activeIndex is within bounds + const safeIndex = Math.min(activeIndex, items.length - 1) + const item = items[safeIndex] + const d = item.data as { title?: string; headline?: string; body?: string; cta_text?: string; image?: string } + + return ( +
+
+
+
+
+ {d.headline && ( + + {d.headline} + + )} + {d.title &&

{d.title}

} + {d.body &&

{d.body}

} + {d.cta_text && ( + + + + )} +
+ + Limited time offer +
+
+ {d.image && ( +
+ {d.title +
+ )} +
+ {/* Navigation dots for multiple campaigns */} + {items.length > 1 && ( +
+ {items.map((_, idx) => ( +
+ )} +
+
+
+ ) +} \ No newline at end of file