"use client";
import React from "react";
import { useState, useEffect } from "react";
import "./termsService.css";
const TermsPage = () => {
  const [termsdata, setTermsdata] = useState(null);

  const fetchdata = async () => {
    const dataObj = await fetch("/api/terms-of-service");
    const response = await dataObj.json();
    setTermsdata(response.data);
  };
  useEffect(() => {
    fetchdata();
  }, []);

  return (
    <div className="sm:max-w-6xl sm:p-0 p-3 mx-auto">
      <div
        className="termspage"
        dangerouslySetInnerHTML={{ __html: termsdata }}
      />
    </div>
  );
};

export default TermsPage;
