@@ -119,7 +119,7 @@ function FileStoragePage() {
119
119
const isFolder = item . type === 'directory' ;
120
120
const confirmMessage = isFolder
121
121
? // eslint-disable-next-line sonarjs/slow-regex
122
- `Are you sure you want to delete the folder "${ item . name . replace ( / \/ + $ / , '' ) } "?
122
+ `Are you sure you want to delete the folder "${ item . name . replace ( / \/ + $ / , '' ) } "?
123
123
Please check that it does not contain any files.`
124
124
: `Are you sure you want to delete the file "${ item . name } "?` ;
125
125
@@ -148,16 +148,14 @@ function FileStoragePage() {
148
148
page : 1 ,
149
149
} ) ;
150
150
} ;
151
-
152
- const [ uploadFileError , setUploadFileError ] = useState ( null ) ;
153
151
const handleUpload = ( files ) => {
154
152
files . forEach ( ( file ) => {
155
- uploadFile ( path , file ) . catch ( ( error ) => {
156
- setUploadFileError ( error . message ) ;
153
+ uploadFile ( path , file ) . catch ( ( ) => {
157
154
} ) ;
158
155
} ) ;
159
156
} ;
160
157
158
+
161
159
const [ createNewFolderError , setCreateNewFolderError ] = useState ( null ) ;
162
160
const handleCreateFolder = ( folderName ) => {
163
161
createFolder ( path , folderName ) . catch ( ( error ) => {
@@ -188,18 +186,18 @@ function FileStoragePage() {
188
186
message = "Successfully deleted file"
189
187
/>
190
188
) }
191
- { uploadFileError && (
189
+ { uploadError && (
192
190
< AlertBanner
193
191
status = "info"
194
192
header = { 'Could not upload file' }
195
- message = { uploadFileError || uploadError ?. message }
193
+ message = { uploadError ?. message }
196
194
/>
197
195
) }
198
196
{ createNewFolderError && (
199
197
< AlertBanner
200
198
status = "info"
201
199
header = { 'Could not upload file' }
202
- message = { createNewFolderError || createFolderError ?. message }
200
+ message = { createFolderError ?. message }
203
201
/>
204
202
) }
205
203
< LocationBar
0 commit comments