"use client";

import React, { useEffect, useState } from "react";
import "./Terms_Conditions.css";
import { useDispatch, useSelector } from "react-redux";
import parse from "html-react-parser";
import { getTerms_and_Conditions } from "../../features/terms_conditions.js/Slice";
import { Container } from "react-bootstrap";
const Terms_Conditions = () => {
  const termsconditions = useSelector(
    (state) => state.termsconditions.termsconditions,
  );
  const dispatch = useDispatch();
  useEffect(() => {
    dispatch(getTerms_and_Conditions());
  }, []);

  return (
    <>
      <section className="Privacy_Policy Terms_Conditions">
        <div className="bg_img_div">
          <div className="bg_div">
            <Container>
              <h1>Terms and Conditions</h1>
            </Container>
          </div>
        </div>
        <div className="container">
          <div className="main_content_div">
            {termsconditions?.map((terms) => (
              <p className="dark_black_text">{parse(terms.content)}</p>
            ))}
          </div>
        </div>
      </section>
    </>
  );
};

export default Terms_Conditions;
