Deploy
This commit is contained in:
@@ -0,0 +1,36 @@
|
|||||||
|
'use client'
|
||||||
|
import { useEmDashContent } from '@/hooks/useEmDashContent'
|
||||||
|
import Image from 'next/image'
|
||||||
|
|
||||||
|
export default function TestimonialsSection() {
|
||||||
|
const { items, loading } = useEmDashContent('posts')
|
||||||
|
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
|
||||||
|
const reviews = items.slice(0, 3)
|
||||||
|
return (
|
||||||
|
<section id="testimonials" data-vula-section="testimonials" data-vula-cms="posts" className="py-20 bg-white">
|
||||||
|
<div className="container mx-auto px-4">
|
||||||
|
<h2 className="text-3xl font-bold text-[#212121] mb-8 text-center">What Guests Say</h2>
|
||||||
|
<div className="grid grid-cols-1 md:grid-cols-3 gap-6">
|
||||||
|
{reviews.map((item) => {
|
||||||
|
const d = item.data as { author?: string; excerpt?: string; image?: string }
|
||||||
|
return (
|
||||||
|
<div key={item.id} className="rounded-xl bg-white border border-neutral-100 shadow-[var(--shadow-card)] p-6 relative">
|
||||||
|
<span className="text-[#E91E63] text-5xl leading-none absolute top-2 left-4 opacity-30">"</span>
|
||||||
|
<p className="text-[#212121]/80 italic mt-4">{d.excerpt || 'Wonderful experience'}</p>
|
||||||
|
<div className="flex items-center gap-3 mt-4">
|
||||||
|
{d.image && (
|
||||||
|
<Image src={d.image} alt={d.author || 'Reviewer'} width={40} height={40} className="rounded-full w-10 h-10 object-cover" />
|
||||||
|
)}
|
||||||
|
<div>
|
||||||
|
<p className="font-semibold text-[#212121]">{d.author || 'Guest'}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
})}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
)
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user