diff --git a/client/src/components/datagrids/links/links-columns.tsx b/client/src/components/datagrids/links/links-columns.tsx index 0c84fe1..f163b20 100644 --- a/client/src/components/datagrids/links/links-columns.tsx +++ b/client/src/components/datagrids/links/links-columns.tsx @@ -75,7 +75,7 @@ export const linksColumns: ColumnDef>[] = [ { accessorKey: 'created_at', header: ({ column }) => ( - + ), cell: ({ row }) => { return ( @@ -87,7 +87,21 @@ export const linksColumns: ColumnDef>[] = [ ); }, }, - + { + accessorKey: 'updated_at', + header: ({ column }) => ( + + ), + cell: ({ row }) => { + return ( +
+ + {row.original.updated_at.toLocaleString()} + +
+ ); + }, + }, { id: 'actions', cell: ({ row }) => , diff --git a/client/src/components/datagrids/links/linkx-table-row-actions.tsx b/client/src/components/datagrids/links/linkx-table-row-actions.tsx index baa43aa..e5e9e87 100644 --- a/client/src/components/datagrids/links/linkx-table-row-actions.tsx +++ b/client/src/components/datagrids/links/linkx-table-row-actions.tsx @@ -1,3 +1,5 @@ +'use client'; + import { DotsHorizontalIcon } from '@radix-ui/react-icons'; import type { Row } from '@tanstack/react-table'; @@ -18,11 +20,15 @@ import { import { LinkSchema } from '@linx/shared'; -interface _DataTableRowActionsProps { +interface DataTableRowActionsProps { row: Row; } -export function DataTableRowActions<_TData>() { +export function DataTableRowActions({ + row, +}: DataTableRowActionsProps) { + const _link = LinkSchema.parse(row.original); + return ( @@ -36,8 +42,6 @@ export function DataTableRowActions<_TData>() { Edit - Make a copy - Favorite Delete