diff --git a/src/components/sections/HeroBannersSection.tsx b/src/components/sections/HeroBannersSection.tsx new file mode 100644 index 0000000..05f2ba9 --- /dev/null +++ b/src/components/sections/HeroBannersSection.tsx @@ -0,0 +1,55 @@ +'use client' + +import { useEmDashContent } from '@/hooks/useEmDashContent' +import Button from '@/components/ui/Button' +import Link from 'next/link' + +export default function HeroBannersSection() { + const { items, loading } = useEmDashContent('hero_banners') + + if (loading) return ( +
+
+
+ ) + + if (items.length === 0) return null + + return ( +
+
+
+ {items.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 && ( + + + + )} +
+
+ ) + })} +
+
+
+ ) +} \ No newline at end of file