@@ -59,7 +59,8 @@ function FileList(props: Props): ReactElement {
59
59
const [ sortedBy , setSortedBy ] = useState < keyof FsEntity | null > ( null ) ;
60
60
const [ sortIncreasing , setSortIncreasing ] = useState < boolean > ( false ) ;
61
61
const allAreSelected =
62
- filesAndFolders ?. length === props . filesystem . selectedFsEntities . length &&
62
+ filesAndFolders ?. length ===
63
+ props . filesystem . selectedFsEntities . length &&
63
64
! ! filesAndFolders ?. length ;
64
65
65
66
const clearSelected = props . clearSelected ;
@@ -77,7 +78,9 @@ function FileList(props: Props): ReactElement {
77
78
...response . data . filter (
78
79
( fsEntity : FsEntity ) => fsEntity . type === "FOLDER"
79
80
) ,
80
- ...response . data . filter ( ( fsEntity : FsEntity ) => fsEntity . type !== "FOLDER" )
81
+ ...response . data . filter (
82
+ ( fsEntity : FsEntity ) => fsEntity . type !== "FOLDER"
83
+ )
81
84
] ) ;
82
85
setError ( "" ) ;
83
86
setCurrentFsItemId ( response . headers [ "x-ff-current" ] ) ;
@@ -119,7 +122,9 @@ function FileList(props: Props): ReactElement {
119
122
setSortIncreasing ( true ) ;
120
123
}
121
124
122
- function getSortingFunction ( property : keyof FsEntity ) : ( a : any , b : any ) => number {
125
+ function getSortingFunction (
126
+ property : keyof FsEntity
127
+ ) : ( a : any , b : any ) => number {
123
128
switch ( property ) {
124
129
case "lastUpdatedBy" :
125
130
case "size" :
@@ -130,19 +135,27 @@ function FileList(props: Props): ReactElement {
130
135
case "name" :
131
136
case "type" :
132
137
return ( a : any , b : any ) =>
133
- a [ property ] . toLowerCase ( ) . localeCompare ( b [ property ] . toLowerCase ( ) ) === 0
138
+ a [ property ]
139
+ . toLowerCase ( )
140
+ . localeCompare ( b [ property ] . toLowerCase ( ) ) === 0
134
141
? a . fileSystemId - b . fileSystemId
135
- : a [ property ] . toLowerCase ( ) . localeCompare ( b [ property ] . toLowerCase ( ) ) ;
142
+ : a [ property ]
143
+ . toLowerCase ( )
144
+ . localeCompare ( b [ property ] . toLowerCase ( ) ) ;
136
145
case "lastUpdated" :
137
146
default :
138
147
return ( a : any , b : any ) =>
139
148
a . lastUpdatedBy . username
140
149
. toLowerCase ( )
141
- . localeCompare ( b . lastUpdatedBy . username . toLowerCase ( ) ) === 0
150
+ . localeCompare (
151
+ b . lastUpdatedBy . username . toLowerCase ( )
152
+ ) === 0
142
153
? a . fileSystemId - b . fileSystemId
143
154
: a . lastUpdatedBy . username
144
- . toLowerCase ( )
145
- . localeCompare ( b . lastUpdatedBy . username . toLowerCase ( ) ) ;
155
+ . toLowerCase ( )
156
+ . localeCompare (
157
+ b . lastUpdatedBy . username . toLowerCase ( )
158
+ ) ;
146
159
}
147
160
}
148
161
@@ -188,10 +201,18 @@ function FileList(props: Props): ReactElement {
188
201
< Col xs = { 6 } md = { 4 } onClick = { ( ) => handleSortClick ( "name" ) } >
189
202
{ "Name" }
190
203
</ Col >
191
- < Col xs = { 6 } md = { 3 } onClick = { ( ) => handleSortClick ( "lastUpdatedBy" ) } >
204
+ < Col
205
+ xs = { 6 }
206
+ md = { 3 }
207
+ onClick = { ( ) => handleSortClick ( "lastUpdatedBy" ) }
208
+ >
192
209
Last updated by
193
210
</ Col >
194
- < Col xs = { 3 } md = { 1 } onClick = { ( ) => handleSortClick ( "lastUpdated" ) } >
211
+ < Col
212
+ xs = { 3 }
213
+ md = { 1 }
214
+ onClick = { ( ) => handleSortClick ( "lastUpdated" ) }
215
+ >
195
216
{ "Last changes" }
196
217
</ Col >
197
218
< Col xs = { 3 } md = { 1 } onClick = { ( ) => handleSortClick ( "size" ) } >
@@ -201,19 +222,25 @@ function FileList(props: Props): ReactElement {
201
222
</ div >
202
223
< div className = "overflow-auto flex-grow-1" >
203
224
{ /*Table Body*/ }
204
- < Row >
225
+ < Row className = "m-0" >
205
226
{ error ? (
206
227
< Col className = { "text-center" } > { error } </ Col >
207
228
) : filesAndFolders ?. length === 0 ? (
208
- < Col className = { "text-center" } > Nothing to see here.</ Col >
229
+ < Col className = { "text-center" } >
230
+ { " " }
231
+ Nothing to see here.
232
+ </ Col >
209
233
) : (
210
234
! filesAndFolders && < FFLoading />
211
235
) }
212
236
213
237
{ filesAndFolders ?. map ( ( folder : FsEntity ) => {
214
238
return (
215
239
< React . Fragment key = { folder . fileSystemId } >
216
- < FileListItem setPath = { setPath } fileListItem = { folder } />
240
+ < FileListItem
241
+ setPath = { setPath }
242
+ fileListItem = { folder }
243
+ />
217
244
< Col xs = { 12 } className = "border-top my-2" />
218
245
</ React . Fragment >
219
246
) ;
0 commit comments