File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -86,6 +86,17 @@ interface TablesResultsProps {
8686 loading ?: boolean ;
8787}
8888
89+ function formatModificationDate ( isoString : string ) : string {
90+ const d = new Date ( isoString ) ;
91+ return d
92+ . toLocaleDateString ( "en-US" , {
93+ month : "short" ,
94+ day : "2-digit" ,
95+ year : "numeric" ,
96+ } )
97+ . replace ( "," , "" ) ;
98+ }
99+
89100function TablesResults ( { data, loading } : TablesResultsProps ) : ReactElement {
90101 const columns : Column [ ] = [
91102 {
@@ -100,6 +111,7 @@ function TablesResults({ data, loading }: TablesResultsProps): ReactElement {
100111 { name : "Description" } ,
101112 { name : "Number of records" } ,
102113 { name : "Number of columns" } ,
114+ { name : "Modification date" } ,
103115 ] ;
104116
105117 const tableData : Record < string , CellPrimitive > [ ] =
@@ -108,6 +120,9 @@ function TablesResults({ data, loading }: TablesResultsProps): ReactElement {
108120 Description : table . description ,
109121 "Number of records" : table . num_entries ,
110122 "Number of columns" : table . num_fields ,
123+ "Modification date" : table . modification_dt
124+ ? formatModificationDate ( table . modification_dt )
125+ : "—" ,
111126 } ) ) ?? [ ] ;
112127
113128 return < CommonTable columns = { columns } data = { tableData } loading = { loading } /> ;
You can’t perform that action at this time.
0 commit comments