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

Latest Posts

+
+
+ {items.slice(0, 3).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.title}

} + {d.excerpt &&

{d.excerpt}

} + {d.author &&

By {d.author}

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