diff --git a/src/components/sections/CurrentOffersSection.tsx b/src/components/sections/CurrentOffersSection.tsx new file mode 100644 index 0000000..a22138b --- /dev/null +++ b/src/components/sections/CurrentOffersSection.tsx @@ -0,0 +1,81 @@ +'use client' + +import Image from 'next/image' +import Link from 'next/link' +import { Card, CardContent } from '@/components/ui/Card' +import { useVulaContent } from '@/hooks/useVulaContent' +import { ArrowRight, Clock } from 'lucide-react' + +interface OfferData { + title?: string + description?: string + price?: number | string + duration?: string + valid_until?: string + image?: string | null +} + +const formatPrice = (price?: number | string) => { + if (typeof price === 'number') return `R${price.toFixed(2)}` + if (typeof price === 'string' && price.trim()) return price.startsWith('R') ? price : `R${price}` + return '' +} + +export default function CurrentOffersSection() { + const { items, loading } = useVulaContent('offers') + + if (loading) return ( +
Fourways seasonal specials
+Current promotions change with the season — book soon while spaces last.
+{d.description}
+ {(price || d.duration || d.valid_until) && ( +