This commit is contained in:
Vula Builder
2026-08-01 16:13:30 +00:00
parent ec44d2f32f
commit 7495f953c5
@@ -0,0 +1,33 @@
'use client'
import Image from 'next/image'
import { useVulaContent } from '@/hooks/useVulaContent'
export default function ShopTheLookSection() {
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="shopthelook" data-vula-section="shopthelook" data-vula-cms="product_carousels" className="py-16 bg-white">
<div className="max-w-6xl mx-auto px-4 sm:px-6 lg:px-8">
<div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6">
{items.map((item) => {
const d = item.data as Record<string, string | undefined>
const imageUrl = d.image
const title = d.title || d.name || d.headline
const body = d.body || d.description || d.excerpt || d.bio
return (
<div key={item.id} className="bg-white rounded-xl overflow-hidden shadow-md hover:shadow-lg transition-shadow border border-gray-100">
{imageUrl && <div className="relative h-48"><Image src={imageUrl} alt={title || ''} fill className="object-cover" /></div>}
<div className="p-5">
{title && <h3 className="font-semibold text-gray-900 mb-2">{title}</h3>}
{body && <p className="text-gray-600 text-sm">{body}</p>}
</div>
</div>
)
})}
</div>
</div>
</section>
)
}