diff --git a/src/app/admin/articles/page.tsx b/src/app/admin/articles/page.tsx
index 97bc5eb0..0773baf0 100644
--- a/src/app/admin/articles/page.tsx
+++ b/src/app/admin/articles/page.tsx
@@ -1,8 +1,8 @@
import Link from "next/link";
import { redirect } from "next/navigation";
import { getTranslations } from "next-intl/server";
-import { deleteArticle } from "@/actions/admin-articles";
import { StatusCard } from "@/components/admin/dashboard";
+import { ArticleCard } from "@/components/admin/article-card";
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
import { prisma } from "@/lib/prisma";
@@ -94,67 +94,15 @@ export default async function AdminArticles({
) : (
{articles.map((a) => (
-
-
- {/* eslint-disable-next-line @next/next/no-img-element */}
-

,
- ) => {
- e.currentTarget.style.visibility = "hidden";
- }}
- />
-
-
-
- {a.title}
-
-
- {a.createdAt ? a.createdAt.toISOString().slice(0, 10) : "—"}
- {authorMap.get(a.userId ?? -1) ? (
- <>
- ·
- {authorMap.get(a.userId ?? -1)}
- >
- ) : null}
-
-
-
- {t("edit")}
-
-
-
-
-
+ id={String(a.id)}
+ title={a.title}
+ slug={a.slug}
+ image={a.image}
+ createdAt={a.createdAt ? a.createdAt.toISOString() : null}
+ author={authorMap.get(a.userId ?? -1)}
+ />
))}
)}
diff --git a/src/components/admin/article-card.tsx b/src/components/admin/article-card.tsx
new file mode 100644
index 00000000..3ddbc01f
--- /dev/null
+++ b/src/components/admin/article-card.tsx
@@ -0,0 +1,79 @@
+"use client";
+
+import Link from "next/link";
+import { useTranslations } from "next-intl";
+import { deleteArticle } from "@/actions/admin-articles";
+
+export function ArticleCard({
+ id,
+ title,
+ slug,
+ image,
+ createdAt,
+ author,
+}: {
+ id: string;
+ title: string;
+ slug: string;
+ image: string;
+ createdAt: string | null;
+ author?: string;
+}) {
+ const t = useTranslations("pages.admin.articles");
+
+ return (
+
+
+ {/* eslint-disable-next-line @next/next/no-img-element */}
+

{
+ e.currentTarget.style.visibility = "hidden";
+ }}
+ />
+
+
+
+ {title}
+
+
+ {createdAt ? createdAt.slice(0, 10) : "—"}
+ {author ? (
+ <>
+ ·
+ {author}
+ >
+ ) : null}
+
+
+
+ {t("edit")}
+
+
+
+
+
+ );
+}