{lead.title}
++ {trim(lead.excerpt || lead.body, 280)} +
+diff --git a/src/components/sections/WokStoriesBlogSection.tsx b/src/components/sections/WokStoriesBlogSection.tsx new file mode 100644 index 0000000..792b503 --- /dev/null +++ b/src/components/sections/WokStoriesBlogSection.tsx @@ -0,0 +1,164 @@ +'use client' + +import Image from 'next/image' +import Link from 'next/link' +import { ArrowRight, UtensilsCrossed } from 'lucide-react' +import Badge from '@/components/ui/Badge' +import { useVulaContent } from '@/hooks/useVulaContent' + +type PostFields = { + title?: string + excerpt?: string + body?: string + author?: string + category?: string + image?: string + url?: string +} + +const trim = (text: string, max: number) => { + if (text.length <= max) return text + return `${text.slice(0, max).trimEnd()}…` +} + +export default function WokStoriesBlogSection() { + const { items, loading } = useVulaContent('posts') + + if (loading) { + return ( +
+ Notes from the corner — new things going into the wok, what the street asked us to try next, and the people who keep coming back. +
++ {trim(lead.excerpt || lead.body, 280)} +
++ {trim(post.excerpt || post.body, 160)} +
+