This commit is contained in:
Vula Builder
2026-07-27 17:10:23 +00:00
parent 856aacfda7
commit 0a4f8ec462
@@ -0,0 +1,48 @@
'use client'
import { useVulaContent } from '@/hooks/useVulaContent'
import { Card, CardContent, CardFooter } from '@/components/ui/Card'
import Button from '@/components/ui/Button'
import Image from 'next/image'
export default function NewArrivalsSection() {
const { items, loading } = useVulaContent('product_carousels')
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="new-arrivals" data-vula-section="newarrivals" data-vula-cms="product_carousels" className="bg-[#18181b] py-20">
<div className="container mx-auto px-4">
<h2 className="font-['Archivo_Black'] uppercase text-4xl md:text-5xl text-[#d4af37] mb-12 tracking-tight">
FRESH DROPS
</h2>
<div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6">
{items.slice(0, 6).map((item) => {
const d = item.data as { title?: string; description?: string; price?: number; image?: string }
return (
<Card key={item.id} className="border-3 border-[#d4af37] bg-black rounded-none shadow-[6px_6px_0_0_#d4af37] overflow-hidden group">
<div className="relative aspect-[3/4] overflow-hidden">
{d.image && (
<Image src={d.image} alt={d.title || ''} fill className="object-cover transition-transform duration-500 group-hover:scale-105" sizes="(max-width: 768px) 100vw, 33vw" />
)}
</div>
<CardContent className="p-4 space-y-2">
{d.title && <h3 className="text-white font-bold uppercase tracking-wider text-lg">{d.title}</h3>}
{d.description && <p className="text-gray-400 text-sm">{d.description}</p>}
{d.price !== undefined && (
<p className="text-[#d4af37] font-bold text-xl">R{Number(d.price || 0).toFixed(2)}</p>
)}
</CardContent>
<CardFooter className="p-4 pt-0">
<Button variant="default" className="w-full bg-[#d4af37] text-black hover:bg-[#b8961e] font-bold uppercase tracking-widest">
ADD TO CART
</Button>
</CardFooter>
</Card>
)
})}
</div>
</div>
</section>
)
}