This commit is contained in:
Vula Builder
2026-07-31 14:12:32 +00:00
parent c137dc45e2
commit 7d12a8f542
@@ -0,0 +1,30 @@
'use client'
import Image from 'next/image'
import { useVulaContent } from '@/hooks/useVulaContent'
export default function iKhayaOffersSection() {
const { items, loading } = useVulaContent('campaigns')
if (loading) return <div className="flex justify-center py-16"><div className="w-8 h-8 rounded-full border-2 border-current border-t-transparent animate-spin" /></div>
if (items.length === 0) return null
return (
<section id="ikhayaoffers" data-vula-section="ikhayaoffers" data-vula-cms="campaigns" className="py-16 bg-gray-900 text-white">
<div className="max-w-6xl mx-auto px-4 sm:px-6 lg:px-8 space-y-10">
{items.map((item) => {
const d = item.data as { title?: string; headline?: string; body?: string; cta_text?: string; image?: string }
return (
<div key={item.id} className="relative overflow-hidden rounded-2xl shadow-xl min-h-[320px] flex items-end">
{d.image && <Image src={d.image} alt={d.title || ''} fill className="object-cover opacity-40" />}
<div className="relative z-10 p-8 sm:p-12 max-w-2xl">
{d.title && <p className="text-xs font-bold uppercase tracking-widest text-yellow-400 mb-2">{d.title}</p>}
{d.headline && <h2 className="text-3xl sm:text-4xl font-bold mb-3">{d.headline}</h2>}
{d.body && <p className="text-gray-200 mb-6 leading-relaxed">{d.body}</p>}
{d.cta_text && <button className="px-8 py-3 bg-yellow-400 text-gray-900 font-bold rounded-full hover:bg-yellow-300 transition-colors">{d.cta_text}</button>}
</div>
</div>
)
})}
</div>
</section>
)
}