"use client"; import { useState } from "react"; import { Plus, Minus } from "lucide-react"; import { siteContent } from "@/data/content"; import { SectionHeading } from "@/components/ui/SectionHeading"; import { Reveal } from "@/components/ui/Reveal"; export function FAQ() { const { faq } = siteContent; const [openIndex, setOpenIndex] = useState(null); function toggle(index: number) { setOpenIndex(openIndex === index ? null : index); } return (
{faq.title}
{[0, 1].map((col) => { const half = Math.ceil(faq.items.length / 2); const items = col === 0 ? faq.items.slice(0, half) : faq.items.slice(half); const offset = col === 0 ? 0 : half; return (
{items.map((item, i) => { const idx = offset + i; return (
{item.answer}
); })}
); })}
); }