diff --git a/src/components/sections/ArtisanStoriesSection.tsx b/src/components/sections/ArtisanStoriesSection.tsx new file mode 100644 index 0000000..3879cc8 --- /dev/null +++ b/src/components/sections/ArtisanStoriesSection.tsx @@ -0,0 +1,56 @@ +'use client' + +import Image from 'next/image' +import Badge from '@/components/ui/Badge' +import { useVulaContent } from '@/hooks/useVulaContent' + +export default function ArtisanStoriesSection() { + const { items, loading } = useVulaContent('posts') + + if (loading) { + return ( +
+
+
+ ) + } + + if (items.length === 0) return null + + return ( +
+
+
+
+

Women of Nongoma, Bulwer, Impendle & Hluhluwe

+

Stories stitched into every weave

+
+
+ +
+ {items.map((item, index) => { + const d = item.data as { title?: string; excerpt?: string; body?: string; author?: string; category?: string; image?: string } + const flip = index % 2 === 1 + return ( +
+
+ {d?.image ? ( + {d.title + ) : ( +
+ )} +
+
+ {d?.category && {d.category}} +

{d?.title}

+

{d?.excerpt}

+ {d?.author &&

By {d.author}

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