diff --git a/src/components/sections/iKhayaHeroSection.tsx b/src/components/sections/iKhayaHeroSection.tsx new file mode 100644 index 0000000..ec66354 --- /dev/null +++ b/src/components/sections/iKhayaHeroSection.tsx @@ -0,0 +1,31 @@ +'use client' +import Image from 'next/image' +import { useVulaContent } from '@/hooks/useVulaContent' + +export default function iKhayaHeroSection() { + const { items, loading } = useVulaContent('hero_banners') + if (loading) return
+ if (items.length === 0) return null + + return ( +
+ {items.slice(0, 1).map((item) => { + const d = item.data as { title?: string; subtitle?: string; cta_text?: string; cta_url?: string; image?: string } + return ( +
+ {d.image && {d.title} +
+ {d.title &&

{d.title}

} + {d.subtitle &&

{d.subtitle}

} + {d.cta_text && ( + d.cta_url + ? {d.cta_text} + : + )} +
+
+ ) + })} +
+ ) +}