11import endsWith from 'lodash/endsWith' ;
22import filter from 'lodash/filter' ;
33import clone from 'lodash/clone' ;
4+ import set from 'lodash/set' ;
5+ import forEach from 'lodash/forEach' ;
46import React , { useEffect , useState } from 'react' ;
57import { Badge , Breadcrumb , Button , Col , Flex , List , Popover , Row , Table , Tooltip , Typography } from 'antd' ;
68import styled from 'styled-components' ;
@@ -9,7 +11,7 @@ import { getFileSize, isDirectory } from './utils';
911import { File , WorkflowType } from './types' ;
1012import { useGetProjectFiles } from './hooks' ;
1113import isEmpty from 'lodash/isEmpty' ;
12- import { forEach , set , uniq } from 'lodash ' ;
14+ import Loading from '../Evaluator/Loading ' ;
1315
1416const DIRECTORY_MIME_TYPE = 'inode/directory' ;
1517
@@ -81,12 +83,12 @@ const FilesTable: React.FC<Props> = ({ onSelectedRows, workflowType }) => {
8183 const [ paths , setPaths ] = useState < string [ ] | null > ( null ) ;
8284 const [ path , setPath ] = useState < string | null > ( null ) ;
8385 const [ selectedRowKeys , setSelectedRowKeys ] = useState < React . Key [ ] > ( [ ] ) ;
84- const [ selectedRows , setSelectedRows ] = useState < File [ ] > ( [ ] ) ;
86+ const [ , setSelectedRows ] = useState < File [ ] > ( [ ] ) ;
8587 // row selection map: path as key -> list of row keys
8688 const [ rowSelectionMap , setRowSelectionMap ] = useState < RowSelectionMap > ( { } ) ;
8789 // row selection map: path as key -> list of files
8890 const [ fileSelectionMap , setFileSelectionMap ] = useState < FileSelectionMap > ( { } ) ;
89- const { fetching, listProjectFiles, data } = useGetProjectFiles ( paths || [ ] ) ;
91+ const { fetching, listProjectFiles, data } = useGetProjectFiles ( ) ;
9092
9193 useEffect ( ( ) => {
9294 if ( ! isEmpty ( path ) || paths === null || isEmpty ( paths ) ) {
@@ -151,7 +153,7 @@ const FilesTable: React.FC<Props> = ({ onSelectedRows, workflowType }) => {
151153 key : 'name' ,
152154 ellipsis : true ,
153155 render : ( file : File ) => {
154- const { name, url } = file ;
156+ const { name } = file ;
155157
156158 if ( file ?. mime !== DIRECTORY_MIME_TYPE ) {
157159 return (
@@ -205,6 +207,7 @@ const FilesTable: React.FC<Props> = ({ onSelectedRows, workflowType }) => {
205207 </ Breadcrumb >
206208 ) }
207209 </ Col >
210+ { fetching && < Loading /> }
208211
209212 < Col sm = { 4 } >
210213 < Flex style = { { flexDirection : 'row-reverse' } } >
0 commit comments