[] {
return [
{
accessorKey: "uuid",
header: "UUID",
cell: ({ getValue }) => ({String(getValue())}
),
},
{
accessorKey: "email",
header: "Email",
},
{
accessorKey: "phone",
header: "Phone",
},
{
accessorKey: "tag",
header: "Tag",
},
{
accessorKey: "active",
header: "Active",
cell: ({ getValue }) => getValue() ? (Yes
) : (No
),
},
{
accessorKey: "isConfirmed",
header: "Confirmed",
cell: ({ getValue }) => getValue() ? (Yes
) : (No
),
},
{
accessorKey: "createdAt",
header: "Created",
cell: ({ getValue }) => dateToLocaleString(getValue() as string),
},
{
accessorKey: "updatedAt",
header: "Updated",
cell: ({ getValue }) => dateToLocaleString(getValue() as string),
},
{
accessorKey: "expiryStarts",
header: "Expiry Starts",
cell: ({ getValue }) => getValue() ? dateToLocaleString(getValue() as string) : "-",
},
{
accessorKey: "expiryEnds",
header: "Expiry Ends",
cell: ({ getValue }) => getValue() ? dateToLocaleString(getValue() as string) : "-",
},
{
accessorKey: "crypUuId",
header: "Encrypted UUID",
},
{
accessorKey: "history",
header: "History",
cell: ({ getValue }) => ({String(getValue() ?? "")}
),
},
{
accessorKey: "collectionTokens.tokens",
header: "Tokens",
cell: ({ row }) => {
const tokens = row.original.collectionTokens?.tokens ?? [];
const defaultToken = row.original.collectionTokens?.default;
if (!tokens.length) return "-";
return (
Collection Tokens
{defaultToken && (
<>
Default
{defaultToken}
>
)}
{tokens.map((t, i) => (
{t.prefix}
{t.token}
))}
);
},
},
{
id: "actions",
header: "Actions",
cell: ({ row }) => {
return (
);
},
}
]
}
export { getColumns };