2026-02-17 09:05:22 +00:00
|
|
|
import { Card, CardContent } from "@/components/ui/card";
|
|
|
|
|
|
2026-04-10 20:03:46 +00:00
|
|
|
type TagStat = { name: string; count: number };
|
|
|
|
|
|
|
|
|
|
type Props = {
|
|
|
|
|
tagStats: TagStat[];
|
|
|
|
|
};
|
2026-02-17 09:05:22 +00:00
|
|
|
|
2026-04-10 20:03:46 +00:00
|
|
|
export default function ContentCategory({ tagStats }: Props) {
|
2026-02-17 09:05:22 +00:00
|
|
|
return (
|
2026-04-10 20:03:46 +00:00
|
|
|
<section className="py-20">
|
2026-02-17 09:05:22 +00:00
|
|
|
<div className="container mx-auto px-6">
|
2026-04-10 20:03:46 +00:00
|
|
|
<h2 className="mb-12 text-center text-3xl font-bold">Tag Populer</h2>
|
2026-02-17 09:05:22 +00:00
|
|
|
|
2026-04-10 20:03:46 +00:00
|
|
|
{tagStats.length === 0 ? (
|
|
|
|
|
<p className="text-center text-muted-foreground">
|
|
|
|
|
Tag akan muncul setelah ada artikel yang dipublikasikan.
|
|
|
|
|
</p>
|
|
|
|
|
) : (
|
|
|
|
|
<Card className="border-1 rounded-2xl shadow-xl">
|
|
|
|
|
<CardContent className="space-y-8 p-10">
|
|
|
|
|
{tagStats.map((item, index) => (
|
|
|
|
|
<div
|
|
|
|
|
key={item.name}
|
|
|
|
|
className="flex items-center justify-between"
|
|
|
|
|
>
|
|
|
|
|
<div className="flex items-center gap-4">
|
|
|
|
|
<div
|
|
|
|
|
className={`h-3 w-3 rounded-full ${
|
|
|
|
|
index % 2 === 0 ? "bg-[#0f3b63]" : "bg-[#b07c18]"
|
|
|
|
|
}`}
|
|
|
|
|
/>
|
2026-02-17 09:05:22 +00:00
|
|
|
|
2026-04-10 20:03:46 +00:00
|
|
|
<span className="text-lg font-medium text-[#0f3b63]">
|
|
|
|
|
{item.name}
|
|
|
|
|
</span>
|
|
|
|
|
</div>
|
2026-02-17 09:05:22 +00:00
|
|
|
|
2026-04-10 20:03:46 +00:00
|
|
|
<span className="text-lg text-gray-500">{item.count}</span>
|
|
|
|
|
</div>
|
|
|
|
|
))}
|
|
|
|
|
</CardContent>
|
|
|
|
|
</Card>
|
|
|
|
|
)}
|
2026-02-17 09:05:22 +00:00
|
|
|
</div>
|
|
|
|
|
</section>
|
|
|
|
|
);
|
|
|
|
|
}
|