diff --git a/src/components/sections/DealBannerSection.tsx b/src/components/sections/DealBannerSection.tsx new file mode 100644 index 0000000..50e5951 --- /dev/null +++ b/src/components/sections/DealBannerSection.tsx @@ -0,0 +1,91 @@ +'use client' + +import { useVulaContent } from "@/hooks/useVulaContent" +import Image from "next/image" +import Link from "next/link" +import Button from "@/components/ui/Button" + +interface AdvertBanner { + id: string + data: { + title?: string + subtitle?: string + image?: string + cta_text?: string + cta_url?: string + } +} + +export default function DealBannerSection() { + const { items, loading } = useVulaContent("advert_banners") + + if (loading) { + return ( + + + + + + ) + } + + if (items.length === 0) return null + + const banner = (items as AdvertBanner[])[0] + const d = banner.data + + return ( + + + + {d.image && ( + + + + )} + + {d.title && ( + + {d.title} + + )} + {d.subtitle && ( + + {d.subtitle} + + )} + + {d.cta_text && ( + + + {d.cta_text} + + + )} + + + Shop Now + + + + + + + + ) +} \ No newline at end of file
+ {d.subtitle} +