import { ColumnDef } from "@tanstack/react-table"; export const cellDateTime = (params: { name: string; title: string }): ColumnDef => { return { id: params.name, accessorKey: params.name, header: params.title, cell: ({ row }) => { const date = row.getValue(params.name); if (!date) return null; return ( {date.toLocaleString("en", { dateStyle: "medium", timeStyle: "short", hour12: false })} ); }, enableSorting: false, enableHiding: false, }; };