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

Journal

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

{d.excerpt}

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