From 4fa65a5d5fbff4312e1a36f9057cbaab056763b0 Mon Sep 17 00:00:00 2001 From: Vula Builder Date: Tue, 23 Jun 2026 08:38:47 +0000 Subject: [PATCH] Deploy --- src/components/sections/CampaignsSection.tsx | 51 ++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 src/components/sections/CampaignsSection.tsx diff --git a/src/components/sections/CampaignsSection.tsx b/src/components/sections/CampaignsSection.tsx new file mode 100644 index 0000000..c1d7ebb --- /dev/null +++ b/src/components/sections/CampaignsSection.tsx @@ -0,0 +1,51 @@ +'use client' + +import { useEmDashContent } from '@/hooks/useEmDashContent' +import Image from 'next/image' +import { ArrowRight } from 'lucide-react' + +const CURRENCY_SYMBOLS: Record = { zar: 'R', usd: '$', eur: '€', gbp: '£', kes: 'KSh', ngn: '₦', ghs: '₵' } +const formatPrice = (amount: number, code?: string) => { + const sym = CURRENCY_SYMBOLS[(code ?? '').toLowerCase()] ?? (code?.toUpperCase() ?? '') + return `${sym}${(amount / 100).toFixed(2)}` +} + +export default function CampaignsSection() { + const { items, loading } = useEmDashContent('campaigns') + + if (loading) return
+ if (items.length === 0) return null + + return ( +
+
+

Limited Drops & Collabs

+

Fresh campaigns that keep the streets talking.

+
+ {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.headline}

} + {d.body &&

{d.body}

} + {d.cta_text && ( + + {d.cta_text} + + )} +
+
+ ) + })} +
+
+
+ ) +}