"use client"; import { CertCard } from "@/components/pages/about/aboutDetail/sertificateCard"; import PaginationLite from "@/components/paginationUI"; import { certs } from "@/lib/demoData"; import httpClient from "@/request/api"; import { endPoints } from "@/request/links"; import { useQuery } from "@tanstack/react-query"; import { motion } from "framer-motion"; import { Award } from "lucide-react"; import { useTranslations } from "next-intl"; import { useState } from "react"; export default function SertificatePage() { const t = useTranslations(); const [currentPage, setCurrentPage] = useState(1); const { data, isLoading } = useQuery({ queryKey: ["sertificate"], queryFn: () => httpClient(endPoints.sertificate), select: (res) => ({ results: res.data?.data?.results, current_page: res.data?.data?.current_page, total_pages: res.data?.data?.total_pages, }), }); console.log(data); const generallydata = data?.results ?? certs; return (
{/* ── Hero ── */}
{t("about.certificatePage.hero.label")} {t("about.certificatePage.hero.title1")}{" "} {t("about.certificatePage.hero.title2")} {t("about.certificatePage.hero.description")}
{/* ── Count strip ── */} {certs.length}

{t("about.certificatePage.count.description")}

{/* ── Cards ── */}
{generallydata.map((c:any, i:number) => ( ))}
{/*pagination*/} {data?.total_pages > 1 && ( )}
); }