'use client'; import '../i18n'; import { useState } from 'react'; import { useTranslation } from 'react-i18next'; export default function FAQ() { const { t } = useTranslation(); const faqs = t('faqs', { returnObjects: true }); const [openIndex, setOpenIndex] = useState(null); const toggle = (index) => { setOpenIndex(openIndex === index ? null : index); }; return (

{t('faq_title')}

{faqs.map((faq, i) => (
{openIndex === i && (

{faq.answer}

)}
))}
); }