diff --git a/src/components/sections/HypeCampaignsSection.tsx b/src/components/sections/HypeCampaignsSection.tsx new file mode 100644 index 0000000..ca37740 --- /dev/null +++ b/src/components/sections/HypeCampaignsSection.tsx @@ -0,0 +1,89 @@ +'use client' + +import { useVulaContent } from "@/hooks/useVulaContent" +import Image from "next/image" +import Link from "next/link" +import Button from "@/components/ui/Button" +import Badge from "@/components/ui/Badge" + +interface Campaign { + id: string + data: { + title?: string + headline?: string + body?: string + cta_text?: string + image?: string + } +} + +export default function HypeCampaignsSection() { + const { items, loading } = useVulaContent("campaigns") + + if (loading) { + return ( +
+
+
+
+
+ ) + } + + if (items.length === 0) return null + + return ( +
+
+

+ Hype Campaigns +

+
+ {(items as Campaign[]).map((item) => { + const d = item.data + return ( +
+ {d.image && ( +
+ {d.title +
+ )} +
+ {d.headline && ( +

+ {d.headline} +

+ )} + {d.title && !d.headline && ( +

{d.title}

+ )} + {d.body &&

{d.body}

} +
+ {d.cta_text && ( + + + + )} +
+
+
+ ) + })} +
+
+
+ ) +} \ No newline at end of file