/* eslint-disable react-hooks/rules-of-hooks */
"use client";
import { AOSInit } from "@/shared/AOSInit";
import Loader from "@/shared/Loader/Loader";
import Usefetch from "@/utils/hooks/Usefetch";
import { useTranslations } from "next-intl";
import React from "react";

type Props = {};

export default function Terms({}: Props) {
  const t = useTranslations("FOOTER");
  const { data: terms, loading } = Usefetch({
    endpoint: "terms",
  });

  return (
    <>
      {loading ? (
        <Loader />
      ) : (
        <div className=" space-y-12  md:space-y-24 overflow-hidden home-page">
          <AOSInit />
          <div
            className="container lg:px-16 px-4 py-12"
            // dangerouslySetInnerHTML={{
            //     __html: privacy?.text,
            //   }}
          >
            <h2 className="text-5xl font-semibold leading-[67px] text-start mb-6">
              {t("terms")}
            </h2>
            <p
              dangerouslySetInnerHTML={{
                __html: terms?.text,
              }}
            ></p>
          </div>
        </div>
      )}
    </>
  );
}
