Sootzani/components/Footer.tsx

95 lines
3.3 KiB
TypeScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

import React from "react";
import Image from "next/image";
import img1 from "../public/img/footerImg1.png";
import img2 from "../public/img/footerImg2.png";
import { footerItems } from "@/constants";
import { aboutFooterItems } from "@/constants";
import Link from "next/link";
import { getSingleWebContents } from "@/utils/commonApi";
import { useQuery } from "@tanstack/react-query";
export default function Footer() {
const { data, isLoading, isError } = useQuery({
queryKey: ["WebContents", "AboutUs"],
queryFn: () => getSingleWebContents("AboutUs"),
refetchOnWindowFocus: false,
});
const fetchedContent = data?.content || "";
return (
// <div classNameName="flex justify-center items-center w-full bg-blue ">
<footer className="bg-blue dark:bg-gray-900">
<div className="mx-auto 3xl:w-[60%] w-[80%] py-7 md:py-8 lg:pt-14 lg:pb-7 ">
<div className="md:flex md:justify-between w-full ">
<div className="grid gap-10 sm:gap-16 md:gap-20 lg:gap-28 grid-cols-1 w-full">
<div>
<h2 className="text-white text-sm sm:text-base font-bold mb-4 ">
درباره سامانه عیون
</h2>
<div>
<p className=" text-white text-xs md:text-sm font-normal md:leading-7">
<div
className=" !text-white footer"
dangerouslySetInnerHTML={{ __html: fetchedContent }}
/>
</p>
</div>
</div>
{/* <div>
<h2 className="text-white text-sm sm:text-base font-bold mb-4">
دسترسی سریع
</h2>
<ul className="text-gray-500 dark:text-gray-400 font-medium text-right">
{footerItems.map((item, index, array) => {
return (
<Link key={item.id} href={item.href}>
<div className=" text-white text-xs md:text-sm font-normal leading-6 mb-3">
{item.name}
</div>
</Link>
);
})}
</ul>
</div> */}
</div>
{/* <div className=" max-md:mt-6 flex flex-row justify-center md:justify-end items-start w-full md:w-1/4 ">
<div className="w-23 h-23 sm:w-36 sm:h-36 ">
<Image
src={img1}
className="h-full w-full object-contain"
alt=" Logo1"
quality={100}
width={100}
height={100}
/>
</div>
<div className="w-23 h-23 sm:w-36 sm:h-36 ">
<Image
src={img2}
className="h-full w-full object-contain"
alt=" Logo2"
quality={100}
width={100}
height={100}
/>
</div>
</div> */}
</div>
<hr className=" border-gray-200 sm:mx-auto dark:border-gray-700 mt-5 sm:mt-10" />
<div className="sm:flex sm:items-center sm:justify-between">
<p className="text-white text-xs font-normal mt-4">
تمامی حقوق مادی و معنوی این وب سایت متعلق به عیون میباشد.
</p>
</div>
</div>
</footer>
// </div>
);
}