'use client'; import { useState } from 'react'; import { motion, AnimatePresence } from 'framer-motion'; import { useTranslation } from 'react-i18next'; import { HelpCircle, ChevronDown, Search } from 'lucide-react'; export default function FAQPage() { const { t } = useTranslation(); const [openIndex, setOpenIndex] = useState(null); const [searchTerm, setSearchTerm] = useState(''); const faqs = [ { question: t('faq.q1'), answer: t('faq.a1') }, { question: t('faq.q2'), answer: t('faq.a2') }, { question: t('faq.q3'), answer: t('faq.a3') }, { question: t('faq.q4'), answer: t('faq.a4') }, { question: t('faq.q5'), answer: t('faq.a5') }, { question: t('faq.q6'), answer: t('faq.a6') }, { question: t('faq.q7'), answer: t('faq.a7') }, { question: t('faq.q8'), answer: t('faq.a8') }, ]; const filteredFaqs = faqs.filter( (faq) => faq.question.includes(searchTerm) || faq.answer.includes(searchTerm) ); const toggleFAQ = (index) => { setOpenIndex(openIndex === index ? null : index); }; return (
{t('faq.pageDescription')}
{faq.answer}
{t('faq.noResults')}