fix(don): fix admin table

This commit is contained in:
2026-06-10 22:14:37 +07:00 Unverified
parent e7fc46a1ed
commit d57a98dc6a
+9 -7
View File
@@ -27,6 +27,11 @@ import { useRouter } from "next/navigation";
const columns: ColumnDef<typeof donations.$inferSelect>[] = [
{ accessorKey: "name", header: "Name", meta: { className: "w-50 truncate" } },
{
accessorFn: (row) => `${row.amount}฿`,
header: "Amount",
meta: { className: "w-24" },
},
{
accessorKey: "message",
cell(props) {
@@ -55,11 +60,6 @@ const columns: ColumnDef<typeof donations.$inferSelect>[] = [
header: "Message",
meta: { className: "w-full" },
},
{
accessorFn: (row) => `${row.amount}฿`,
header: "Amount",
meta: { className: "w-24" },
},
{
accessorKey: "id",
header() {
@@ -109,7 +109,7 @@ const columns: ColumnDef<typeof donations.$inferSelect>[] = [
<MessageCircleWarning />
</ActionButton>
</SimpleTooltip>
{row.row.original.uid && (
{row.row.original.uid ? (
<SimpleTooltip text="Copy Artifact UID">
<ActionButton
size="icon-sm"
@@ -120,6 +120,8 @@ const columns: ColumnDef<typeof donations.$inferSelect>[] = [
<Copy />
</ActionButton>
</SimpleTooltip>
) : (
<div className="size-8" />
)}
{row.row.original.image && (
<SimpleTooltip text="Open Image">
@@ -144,7 +146,7 @@ const columns: ColumnDef<typeof donations.$inferSelect>[] = [
</div>
);
},
meta: { className: "w-24 p-0" },
meta: { className: "w-27 p-0" },
},
];