@@ -60,7 +60,7 @@ const PreviewFile = ( { file, isLoading, onImageLoaded } ) => {
60
60
) ;
61
61
} ;
62
62
63
- const FileField = ( { file, onClick, key } ) => {
63
+ const FileField = ( { file, onClick } ) => {
64
64
const fileExtension = file . name . split ( '.' ) . pop ( ) . toLowerCase ( ) ;
65
65
const fileType = file . type . split ( '/' ) [ 0 ] ;
66
66
@@ -96,7 +96,7 @@ const FileField = ( { file, onClick, key } ) => {
96
96
const iconType = extensionMap [ fileExtension ] || iconMap [ fileType ] || 'txt' ;
97
97
const iconClass = clsx ( 'file-field__icon' , 'icon-' + iconType ) ;
98
98
return (
99
- < div key = { key } className = "file-field__item" >
99
+ < div className = "file-field__item" >
100
100
< div className = "file-field__info" >
101
101
< div className = { iconClass } > </ div >
102
102
< div className = "file-field__name" >
@@ -174,12 +174,16 @@ const InboxResponse = ( { response, loading, onModalStateChange } ) => {
174
174
return (
175
175
< div className = "file-field" >
176
176
{ value . files ?. length
177
- ? value . files . map ( ( file , index ) => {
177
+ ? value . files . map ( file => {
178
178
if ( ! file || ! file . name ) {
179
179
return null ;
180
180
}
181
181
return (
182
- < FileField file = { file } onClick = { handleFilePreview ( file ) } key = { index } />
182
+ < FileField
183
+ file = { file }
184
+ onClick = { handleFilePreview ( file ) }
185
+ key = { file . file_id }
186
+ />
183
187
) ;
184
188
} )
185
189
: '-' }
0 commit comments