32 lines
736 B
TypeScript
32 lines
736 B
TypeScript
"use client";
|
|
import { User } from "@repo/db";
|
|
import { ColumnDef } from "@tanstack/react-table";
|
|
import { PaginatedTable } from "_components/PaginatedTable";
|
|
|
|
export default function () {
|
|
return (
|
|
<PaginatedTable
|
|
strictQuery
|
|
searchFields={["firstname", "lastname", "vatsimCid"]}
|
|
prismaModel={"user"}
|
|
filter={{
|
|
vatsimCid: {
|
|
gt: 1,
|
|
},
|
|
}}
|
|
leftOfSearch={<h1 className="text-2xl font-bold">Vatsim-Nutzer</h1>}
|
|
columns={
|
|
[
|
|
{ header: "Vorname", accessorKey: "firstname" },
|
|
{
|
|
header: "Nachname",
|
|
accessorKey: "lastname",
|
|
cell: ({ row }) => row.original.lastname[0],
|
|
},
|
|
{ header: "Vatsim CID", accessorKey: "vatsimCid" },
|
|
] as ColumnDef<User>[]
|
|
}
|
|
/>
|
|
);
|
|
}
|