diff --git a/package.json b/package.json index 819f9fd..aa440f3 100644 --- a/package.json +++ b/package.json @@ -19,6 +19,7 @@ "astro": "^2.7.0", "atropos": "^1.0.2", "file-saver": "^2.0.5", + "framer-motion": "^10.12.18", "html2canvas": "^1.4.1", "react": "^18.2.0", "react-dom": "^18.2.0", diff --git a/src/components/Faq.tsx b/src/components/Faq.tsx index 221a3f1..ca3a6b1 100644 --- a/src/components/Faq.tsx +++ b/src/components/Faq.tsx @@ -1,4 +1,5 @@ import { useState } from 'react' +import { motion, AnimatePresence } from 'framer-motion' import type { Faq } from '../types/types' const faq: Faq[] = [ @@ -12,12 +13,12 @@ const faq: Faq[] = [ }, { question: '¿Puedo presentar mi charla?', - answer: 'Las inscripciones ya están cerradas, pero puedes votar por las charlas que más te gusten.', + answer: 'Las inscripciones ya están cerradas, puedes ver las seleccionada en el apartado de horarios.', }, - { + /* { question: '¿Cuántas charlas y/o talleres puedo votar?', answer: 'Tantas como quieras.', - }, + },*/ { question: '¿Se podrán ver las charlas más tarde?', answer: 'Sí, todas las charlas se podrán ver más tarde en youtube/@afordigital.', @@ -27,50 +28,76 @@ const faq: Faq[] = [ const Faq = () => { const [openFaq, setOpenFaq] = useState(null) - const handleFaq = index => { - setOpenFaq(prev => { + const handleFaq = (index) => { + setOpenFaq((prev) => { return prev === index ? null : index }) } return ( -
-
-
-

+
+
+
+

Preguntas Frecuentes

-
    +
      {faq.map((item, index) => { return (
    • -
      -

      handleFaq(index)} - > - {item.question} - - - -

      -
      -
      handleFaq(index)} > -

      -

      +
      +

      + {item.question} + + + +

      +
      + + + {openFaq === index && ( + +

      + + )} +

    • ) })}