diff --git a/client/src/components/transaction/columns.tsx b/client/src/components/transaction/columns.tsx index 406b63f..d83e7f2 100644 --- a/client/src/components/transaction/columns.tsx +++ b/client/src/components/transaction/columns.tsx @@ -61,12 +61,18 @@ export const columns: ColumnDef[] = [ accessorKey: 'Description', header: 'Description', }, + { + accessorKey: 'type', + header: () =>
Type
, + cell: ({ row }) =>
{row.original.Type}
, + }, { accessorKey: 'amount', header: () =>
Amount
, cell: ({ row }) =>
{row.original.Amount}
, }, + { id: 'actions', enableHiding: false, diff --git a/client/src/pages/(secure)/columns.tsx b/client/src/pages/(secure)/columns.tsx index a2e89ad..172bbac 100644 --- a/client/src/pages/(secure)/columns.tsx +++ b/client/src/pages/(secure)/columns.tsx @@ -16,29 +16,16 @@ import { import { useUserData, type Transaction } from '@/components/context/userData'; export const columns: ColumnDef[] = [ - { - accessorKey: 'CreatedAt', - header: 'Created At', - cell: ({ row }) => { - const rawDate = row.getValue('CreatedAt') as string; - const date = new Date(rawDate); - if (isNaN(date.getTime())) throw new Error('Invalid date'); - - return ( -
- {date.toLocaleString('en-US', { - dateStyle: 'short', - timeStyle: 'medium', - })} -
- ); - }, - }, { accessorKey: 'Description', header: 'Description', }, +{ + accessorKey: 'type', + header: () =>
Type
, + cell: ({ row }) =>
{row.original.Type}
, + }, { accessorKey: 'amount',