@@ -9,11 +9,11 @@ import {
99  useReactTable , 
1010  getPaginationRowModel , 
1111  getSortedRowModel , 
12- }  from  '@tanstack/react-table' ; 
13- import  Moment  from  'moment' ; 
12+ }  from  '@tanstack/react-table' ; ; 
1413import  {  Table ,  TableBody ,  TableCell ,  TableHead ,  TableHeader ,  TableRow  }  from  '@/components/ui/table' ; 
1514import  {  useTranslation  }  from  'react-i18next' ; 
1615import  {  GameDetails  }  from  './columns' ; 
16+ import  {  format ,  parse  }  from  'date-fns' ; 
1717
1818interface  DataTableProps < TData >  { 
1919  columns : ColumnDef < TData > [ ] ; 
@@ -56,7 +56,7 @@ export function DataTable<TData extends GameDetails>({ columns, data }: DataTabl
5656                      { header . column . id  ===  'header_Result' 
5757                        ? flexRender ( header . column . columnDef . header ,  header . getContext ( ) ) 
5858                        : null } 
59-                       { header . column . id  ===  'moves'  ? t ( String ( header . column . id ) . toLowerCase ( ) )  : null } 
59+                       { /* { header.column.id === 'moves' ? t(String(header.column.id).toLowerCase()) : null} */ } 
6060                      { header . column . id  ===  'header_Date'  ? t ( 'date' )  : null } 
6161                    </ TableHead > 
6262                  ) ; 
@@ -73,12 +73,10 @@ export function DataTable<TData extends GameDetails>({ columns, data }: DataTabl
7373                      { cell . column . id  ===  'select'  ? flexRender ( cell . column . columnDef . cell ,  cell . getContext ( ) )  : null } 
7474                      { cell . column . id  ===  'players'  ? flexRender ( cell . column . columnDef . cell ,  cell . getContext ( ) )  : null } 
7575                      { cell . column . id  ===  'header_Result' 
76-                         ? t ( String ( cell . row . original . header . Result ) . toLowerCase ( ) ) 
77-                         : null } 
78-                       { cell . column . id  ===  'moves'  ? cell . row . original . header . Round  : null } 
79-                       { cell . column . id  ===  'header_Date' 
80-                         ? Moment ( cell . row . original . header . Date ) . format ( ' DD / MM / YYYY' ) 
76+                         ? t ( String ( cell . row . original . header . Termination ) . toLowerCase ( ) ) 
8177                        : null } 
78+                       { /* {cell.column.id === 'moves' ? cell.row.original.header.Round : null} */ } 
79+                       { cell . column . id  ===  'header_Date'  ? format ( parse ( cell . row . original . header . Date ,  'yyyy.MM.dd' ,  new  Date ( ) ) ,  'dd / MM / yyyy' )  : null } 
8280                      { cell . column . id  ===  'actions'  ? flexRender ( cell . column . columnDef . cell ,  cell . getContext ( ) )  : null } 
8381                    </ TableCell > 
8482                  ) ) } 
0 commit comments