From da529a8eb656a274083d88bf5271cfc86bb33f17 Mon Sep 17 00:00:00 2001 From: Vula Builder Date: Sat, 27 Jun 2026 09:51:17 +0000 Subject: [PATCH] Deploy --- .../sections/TestimonialsSection.tsx | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 src/components/sections/TestimonialsSection.tsx diff --git a/src/components/sections/TestimonialsSection.tsx b/src/components/sections/TestimonialsSection.tsx new file mode 100644 index 0000000..8edec6f --- /dev/null +++ b/src/components/sections/TestimonialsSection.tsx @@ -0,0 +1,45 @@ +'use client' + +import { useEmDashContent } from '@/hooks/useEmDashContent' + +export default function TestimonialsSection() { + const { items, loading } = useEmDashContent('posts') + + if (loading) { + return ( +
+
+
+ ) + } + + if (items.length === 0) return null + + // Use only first 3 items for testimonial cards + const featured = items.slice(0, 3) + + return ( +
+
+

Cosa Dicono i Nostri Ospiti

+
+ {featured.map((item) => { + const d = item.data as { title?: string; excerpt?: string; author?: string; category?: string; body?: string } + const quote = d.excerpt || d.body?.slice(0, 100) || '' + return ( +
+ {/* Leaf motif */} +
+

“{quote}”

+
+

{d.author || 'Ospite'}

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