"use client"; import { AnimatePresence, motion } from "framer-motion"; import { Section } from "@/types/landing"; import { useState } from "react"; export default function ({ section }: { section: Section }) { const [activeIndex, setActiveIndex] = useState(null); const toggleFAQ = (index: number) => { setActiveIndex(activeIndex === index ? null : index); }; return (

{section.title}

{section.description}

{section?.items?.map((faq, index) => (
{activeIndex === index && (

{faq.description}

)}
))}
); }