chceck api working
This commit is contained in:
@@ -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*/}
|
||||
|
||||
Reference in New Issue
Block a user