Faqs.js 2.18 KB
import React from "react";
import { Accordion } from "react-bootstrap";
import { fadeIn, zoomIn, slideFromLeft, slideFromRight } from "../animationvariants.js";
import { motion } from "framer-motion";
const Faqs = ({ faqs }) => {
  console.log("faqs====", faqs);
  return (
    <section className="faqs-session">
      <div className="container">
        <div className="row">
          <div className="col-12">
            <motion.div variants={slideFromRight(0.4)} initial={"false"} whileInView={"show"} viewport={{ once: false, amount: 0.2 }}>
              <div className="head-btn">
                <div className="head01">
                  <div className="title">What others</div>
                  <h2>Have asked us</h2>
                </div>
              </div>
            </motion.div>
          </div>
        </div>
        <div className="row">
          <div className="col-12">
            <Accordion defaultActiveKey="0" className="accordion-01">
              {faqs?.data && faqs?.data.map((item, index) => (
                <Accordion.Item eventKey={index}>
                  <Accordion.Header>{item?.attributes?.question}</Accordion.Header>
                  <Accordion.Body dangerouslySetInnerHTML={{ __html: item?.attributes?.answer }}>

                  </Accordion.Body>
                </Accordion.Item>
              ))}

              {/* <Accordion.Item eventKey="1">
                <Accordion.Header>Lorem ipsum dolor sit amet, consectetur adipiscing elit ?</Accordion.Header>
                <Accordion.Body>
                  Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis
                  nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
                  fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum
                </Accordion.Body>
              </Accordion.Item> */}
            </Accordion>
          </div>
        </div>
      </div>
    </section>
  );
};

export default Faqs;