chceck api working

This commit is contained in:
nabijonovdavronbek619@gmail.com
2026-03-05 17:25:45 +05:00
parent 9cc151a796
commit cd7d6bb208
5 changed files with 50 additions and 19 deletions

View File

@@ -1,4 +1,5 @@
"use client";
import { CertCardSkeleton } from "@/components/pages/about/aboutDetail/loading/loading";
import { CertCard } from "@/components/pages/about/aboutDetail/sertificateCard";
import PaginationLite from "@/components/paginationUI";
import { certs } from "@/lib/demoData";
@@ -23,8 +24,7 @@ export default function SertificatePage() {
}),
});
console.log(data);
const generallydata = data?.results ?? certs;
const generallydata = data?.results || certs;
return (
<main className="min-h-screen bg-[#0f0e0d] text-white pb-44 overflow-x-hidden">
@@ -88,9 +88,13 @@ export default function SertificatePage() {
{/* ── Cards ── */}
<section className="max-w-4xl mx-auto px-6 flex flex-col gap-4">
{generallydata.map((c:any, i:number) => (
<CertCard key={c.id} c={c} i={i} />
))}
{isLoading ? (
<CertCardSkeleton />
) : (
generallydata.map((c: any, i: number) => (
<CertCard key={c.id} c={c} i={i} />
))
)}
</section>
{/*pagination*/}