diff --git a/src/components/sections/TestimonialsSection.tsx b/src/components/sections/TestimonialsSection.tsx new file mode 100644 index 0000000..38395ce --- /dev/null +++ b/src/components/sections/TestimonialsSection.tsx @@ -0,0 +1,38 @@ +'use client' +import { useVulaContent } from '@/hooks/useVulaContent' + +export default function TestimonialsSection() { + const { items, loading } = useVulaContent('posts') + const featured = (items ?? []).slice(0, 3) + + if (loading) { + return
+ } + if (featured.length === 0) return null + + return ( +
+
+
+

Customer stories

+

Kind words from homes across South Africa

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

“{quote}”

+
+

{d.author || 'Ukaya Home customer'}

+

{d.category || d.title || 'Verified buyer'}

+
+
+ ) + })} +
+
+
+ ) +} \ No newline at end of file