@@ -3,13 +3,12 @@ import { useState, useEffect } from 'react';
33import { useReactTable , getCoreRowModel , createColumnHelper } from '@tanstack/react-table' ;
44import { formatFileSize } from '../utils/utils' ;
55
6-
76interface CustomFile extends Partial < globalThis . File > {
8- processing : string ,
9- status : string ,
10- NodesCount : number ,
11- id : string ,
12- relationshipCount : number ,
7+ processing : string ;
8+ status : string ;
9+ NodesCount : number ;
10+ id : string ;
11+ relationshipCount : number ;
1312}
1413export default function FileTable ( { files } : { files : CustomFile [ ] | [ ] } ) {
1514 const [ data , setData ] = useState ( [ ...files ] ) ;
@@ -33,43 +32,41 @@ export default function FileTable({ files }: { files: CustomFile[] | [] }) {
3332 footer : ( info ) => info . column . id ,
3433 } ) ,
3534 columnHelper . accessor ( ( row ) => row . processing , {
36- id : " processing" ,
35+ id : ' processing' ,
3736 cell : ( info ) => < i > { info . getValue ( ) } </ i > ,
3837 header : ( ) => < span > Processing Time</ span > ,
3938 footer : ( info ) => info . column . id ,
4039 } ) ,
4140 columnHelper . accessor ( ( row ) => row . status , {
42- id : " status" ,
41+ id : ' status' ,
4342 cell : ( info ) => < i > { info . getValue ( ) } </ i > ,
4443 header : ( ) => < span > Status</ span > ,
4544 footer : ( info ) => info . column . id ,
4645 } ) ,
4746 columnHelper . accessor ( ( row ) => row . NodesCount , {
48- id : " NodesCount" ,
47+ id : ' NodesCount' ,
4948 cell : ( info ) => < i > { info . getValue ( ) } </ i > ,
5049 header : ( ) => < span > Nodes Count</ span > ,
5150 footer : ( info ) => info . column . id ,
5251 } ) ,
5352 columnHelper . accessor ( ( row ) => row . relationshipCount , {
54- id : " relationshipCount" ,
53+ id : ' relationshipCount' ,
5554 cell : ( info ) => < i > { info . getValue ( ) } </ i > ,
5655 header : ( ) => < span > Relationships</ span > ,
5756 footer : ( info ) => info . column . id ,
58- } )
57+ } ) ,
5958 ] ;
6059
6160 useEffect ( ( ) => {
6261 setData ( [ ...files ] ) ;
6362 } , [ files ] ) ;
6463
65-
6664 const table = useReactTable ( {
6765 data,
6866 columns,
6967 getCoreRowModel : getCoreRowModel ( ) ,
7068 } ) ;
7169
72-
7370 return (
7471 < >
7572 { data ? (
@@ -81,10 +78,8 @@ export default function FileTable({ files }: { files: CustomFile[] | [] }) {
8178 styling = { {
8279 zebraStriping : false ,
8380 borderStyle : 'all-sides' ,
84-
8581 } }
8682 />
87-
8883 </ div >
8984 ) : null }
9085 </ >
0 commit comments