"use client"; import Link from "next/link"; import { useTranslations } from "next-intl"; import { deleteArticle } from "@/actions/admin-articles"; export function ArticleCard({ id, title, image, createdAt, author, }: { id: string; title: string; image: string; createdAt: string | null; author?: string; }) { const t = useTranslations("pages.admin.articles"); return (
{createdAt ? createdAt.slice(0, 10) : "—"} {author ? ( <> · {author} > ) : null}