From b70a0da6eb8f20332aebd60f281138affc294ec8 Mon Sep 17 00:00:00 2001 From: Vula Builder Date: Sun, 11 Oct 2026 14:20:28 +0000 Subject: [PATCH] Deploy --- src/components/sections/SpecialsSection.tsx | 42 +++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 src/components/sections/SpecialsSection.tsx diff --git a/src/components/sections/SpecialsSection.tsx b/src/components/sections/SpecialsSection.tsx new file mode 100644 index 0000000..27ddd40 --- /dev/null +++ b/src/components/sections/SpecialsSection.tsx @@ -0,0 +1,42 @@ +'use client' +import { useVulaContent } from '@/hooks/useVulaContent' +import { Tag } from 'lucide-react' + +// CmsItem shape: { id, title: string|null, data: Record, ... } +// Custom fields (price, description, image, available_until) live inside .data + +export default function SpecialsSection() { + const { items: specials, isLoading } = useVulaContent('specials') + if (isLoading) return ( +
{Array.from({ length: 3 }).map((_, i) =>
)}
+ ) + if (!specials?.length) return null + return ( +
+
+
+

Limited Time

+

Today's Specials

+
+
+ {specials.map((s) => { + const d = s.data as Record + return ( +
+ {d.image &&
{s.title
} +
+
+

{s.title}

+ {d.price && {d.price}} +
+ {d.description &&

{d.description}

} + {d.available_until &&

Until {d.available_until}

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