diff --git a/src/components/sections/MadadeniFoodGallerySection.tsx b/src/components/sections/MadadeniFoodGallerySection.tsx new file mode 100644 index 0000000..9eee2a4 --- /dev/null +++ b/src/components/sections/MadadeniFoodGallerySection.tsx @@ -0,0 +1,128 @@ +'use client' + +import { useState } from 'react' +import Image from 'next/image' +import { Flame } from 'lucide-react' +import { useVulaContent } from '@/hooks/useVulaContent' +import Modal from '@/components/ui/Modal' + +type GalleryEntry = { + id: string + title: string + description: string + image: string +} + +export default function MadadeniFoodGallerySection() { + const { items, loading } = useVulaContent('gallery') + const [active, setActive] = useState(null) + + if (loading) { + return ( +
+
+
+ ) + } + + if (items.length === 0) return null + + const gallery: GalleryEntry[] = items.map((item) => { + const d = item.data as { title?: string; description?: string; image?: string } + return { + id: item.id, + title: d.title ?? '', + description: d.description ?? '', + image: d.image ?? '', + } + }) + + return ( + + ) +}