From cf5f7b8e634e28bfa5bf3de4d4e2b6b1108ace1c Mon Sep 17 00:00:00 2001 From: Vula Builder Date: Tue, 14 Jul 2026 19:12:52 +0000 Subject: [PATCH] Deploy --- .../sections/KnowBeforeYouGoSection.tsx | 63 +++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 src/components/sections/KnowBeforeYouGoSection.tsx diff --git a/src/components/sections/KnowBeforeYouGoSection.tsx b/src/components/sections/KnowBeforeYouGoSection.tsx new file mode 100644 index 0000000..7c3965f --- /dev/null +++ b/src/components/sections/KnowBeforeYouGoSection.tsx @@ -0,0 +1,63 @@ +'use client' + +import { useState } from 'react' +import { useEmDashContent } from '@/hooks/useEmDashContent' +import { ChevronDown, ChevronUp, Info } from 'lucide-react' + +export default function KnowBeforeYouGoSection() { + const { items, loading } = useEmDashContent('policies') + const [openIndex, setOpenIndex] = useState(null) + + if (loading) { + return ( +
+
+
+ ) + } + + if (items.length === 0) return null + + const toggle = (index: number) => { + setOpenIndex(prev => (prev === index ? null : index)) + } + + return ( +
+
+

Know before you go

+
+ {items.map((item, idx) => { + const d = item.data as { title?: string; description?: string; body?: string } + const content = d.description || d.body || '' + const isOpen = openIndex === idx + + return ( +
+ + {isOpen && ( +
+ {content || 'Details coming soon.'} +
+ )} +
+ ) + })} +
+
+
+ ) +}