diff --git a/src/components/sections/GuestStoriesSection.tsx b/src/components/sections/GuestStoriesSection.tsx new file mode 100644 index 0000000..f1a1399 --- /dev/null +++ b/src/components/sections/GuestStoriesSection.tsx @@ -0,0 +1,60 @@ +'use client' +import { useEmDashContent } from '@/hooks/useEmDashContent' +import Image from 'next/image' +import { Card, CardHeader, CardTitle, CardContent } from '@/components/ui/Card' + +export default function GuestStoriesSection() { + const { items, loading } = useEmDashContent('posts') + + if (loading) return
+ if (items.length === 0) return null + + return ( +
+
+
+ + Guest Stories + +
+

+ Voices of Our Guests +

+
+ {items.slice(0, 6).map((item) => { + const d = item.data as { title?: string; excerpt?: string; author?: string; category?: string; image?: string } + return ( + +
+ {d.image ? ( + {d.title + ) : ( +
+ )} +
+ +
+ {d.category && {d.category}} +
+ {d.title} +
+ +

{d.excerpt}

+ {d.author && ( +

— {d.author}

+ )} +
+ + ) + })} +
+
+
+ ) +}