"use client" import DotAnimatsiya from "@/components/dot/DotAnimatsiya"; import httpClient from "@/request/api"; import { endPoints } from "@/request/links"; import { useQuery } from "@tanstack/react-query"; import { ChevronRight } from "lucide-react"; import { useLocale, useTranslations } from "next-intl"; import Image from "next/image"; import Link from "next/link"; import { motion } from "framer-motion"; import { ServicesLoading } from "./loading"; import { EmptyServices } from "./empty"; export function OurService() { const t = useTranslations(); const locale = useLocale(); // get request const { data, isLoading, isError } = useQuery({ queryKey: ['firesafety'], queryFn: () => httpClient(endPoints.services.all) }); console.log("service data: ", data); // Animation variants const containerVariants = { hidden: { opacity: 0 }, visible: { opacity: 1, transition: { staggerChildren: 0.1, }, }, }; const cardVariants = { hidden: { opacity: 0, y: 20 }, visible: { opacity: 1, y: 0, transition: { duration: 0.5, ease: [0.22, 1, 0.36, 1] as const, }, }, }; return (
{/* Header for github */}
{t("home.services.title")}

{t("home.services.subtitle")}

{t("home.services.description")}

{/* Conditional Rendering */} {isLoading ? (
) : !data || (Array.isArray(data) && data.length === 0) ? (
) : ( {/* cards */}

{t("home.services.services.operation.title")}

{t("home.services.services.operation.description")}

images

{t("home.services.services.suppression.title")}

{t("home.services.services.suppression.description")}

images
images

{t("home.services.services.safety.title")}

{t("home.services.services.safety.description")}

{t("home.services.services.monitoring.title")}

{t("home.services.services.monitoring.description")}

images

{t("home.services.viewMoreServices")}

{t("home.services.viewMore")}
)}
); }