From 94995f893b664c238fd36611ff99b67a15ab3b01 Mon Sep 17 00:00:00 2001 From: Vula Builder Date: Tue, 23 Jun 2026 08:47:37 +0000 Subject: [PATCH] Deploy --- src/components/sections/PromotionsSection.tsx | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 src/components/sections/PromotionsSection.tsx diff --git a/src/components/sections/PromotionsSection.tsx b/src/components/sections/PromotionsSection.tsx new file mode 100644 index 0000000..b8c899a --- /dev/null +++ b/src/components/sections/PromotionsSection.tsx @@ -0,0 +1,42 @@ +'use client' +import { useEmDashContent } from '@/hooks/useEmDashContent' +import { Card, CardHeader, CardTitle, CardContent, CardFooter } from '@/components/ui/Card' +import Image from 'next/image' +import Button from '@/components/ui/Button' + +export default function PromotionsSection() { + const { items, loading } = useEmDashContent('promotions') + if (loading) return
+ if (items.length === 0) return null + return ( +
+
+

Special Promotions

+
+ {items.map((item) => { + const d = item.data as { title?: string; description?: string; price?: number; image?: string } + return ( + + {d.image && ( +
+ {d.title +
+ )} + + {d.title} + + +

{d.description}

+
+ +

{d.price ? `R${Number(d.price).toFixed(0)}` : 'Contact us'}

+ +
+
+ ) + })} +
+
+
+ ) +} \ No newline at end of file