"use client"; import { Reveal } from "@/components/landing-page/Reveal"; import React, { useState } from "react"; import { useTranslations } from "next-intl"; interface FAQItem { question: string; answer: string; } const FAQS: React.FC = () => { const t = useTranslations("LandingPage"); const faqs: FAQItem[] = [ { question: t("question1"), answer: t("answer1"), }, { question: t("question2"), answer: t("answer2"), }, { question: t("question3"), answer: t("answer3"), }, { question: t("question4"), answer: t("answer4"), }, ]; const [openIndex, setOpenIndex] = useState(null); const toggleFAQ = (index: number) => { setOpenIndex(openIndex === index ? null : index); }; return (
{/* Header */}
Faqs

Frequently Asked Questions

{/* FAQS Items */}
{faqs?.map((faq, index) => (
toggleFAQ(index)}>

{faq.question}

{openIndex === index ? "−" : "+"}
{openIndex === index &&

{faq.answer}

}
))}
); }; export default FAQS;