From d39c028c2f6d99df9af4c717a7911394388a2756 Mon Sep 17 00:00:00 2001 From: Michael Liendo Date: Fri, 16 Aug 2024 01:31:42 -0400 Subject: [PATCH] chore: update names --- .../datagrids/links/links-columns.tsx | 18 ++++++++++++++++-- .../links/linkx-table-row-actions.tsx | 12 ++++++++---- 2 files changed, 24 insertions(+), 6 deletions(-) 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