Files
buzz/app/(ui)/donate/top/table.tsx
T
gunshiz 0afd974433
Build and Push Image / build-backend (push) Successful in 18s
Build and Push Image / build-frontend (push) Successful in 1m18s
Build and Push Image / push (push) Successful in 47s
refactor: update UI text, metadata, and styles across donation and artifact admin pages
2026-06-10 19:05:23 +07:00

44 lines
955 B
TypeScript

"use client";
import type { ColumnDef } from "@tanstack/react-table";
import { DataTable } from "@/components/tantable";
type NumberString = `${number}`;
type NumberLike = number | NumberString;
interface TopDonateRow {
i: NumberLike;
name: string;
amount: number;
}
const columns: ColumnDef<TopDonateRow>[] = [
{
accessorKey: "i",
header: "#",
meta: { className: "w-12 text-center" },
},
{
accessorKey: "name",
header: "Name",
meta: { className: "w-full truncate" },
},
{
accessorFn: (row) => `${row.amount}฿`,
header: "Amount",
meta: { className: "w-24" },
},
];
export function TopDonateTable({ data }: { data: TopDonateRow[] }) {
return (
<DataTable
home="/donate"
columns={columns}
data={data}
emptyDescription="ยังไม่มีโดเนท"
className="h-full max-h-[calc(100svh-264px)] w-full overflow-y-auto backdrop-blur-md"
/>
);
}