@@ -220,16 +220,16 @@ export const ArtifactVersionPage: FunctionComponent<ArtifactVersionPageProps> =
220
220
return artifact ?. type || "" ;
221
221
} ;
222
222
223
- const artifactName = ( ) : string => {
224
- return artifact ?. name || "" ;
223
+ const versionName = ( ) : string => {
224
+ return artifactVersion ?. name || "" ;
225
225
} ;
226
226
227
- const artifactDescription = ( ) : string => {
228
- return artifact ?. description || "" ;
227
+ const versionDescription = ( ) : string => {
228
+ return artifactVersion ?. description || "" ;
229
229
} ;
230
230
231
- const artifactLabels = ( ) : { [ key : string ] : string } => {
232
- return artifact ?. labels || { } ;
231
+ const versionLabels = ( ) : { [ key : string ] : string } => {
232
+ return artifactVersion ?. labels || { } ;
233
233
} ;
234
234
235
235
const onUploadFormValid = ( isValid : boolean ) : void => {
@@ -303,10 +303,10 @@ export const ArtifactVersionPage: FunctionComponent<ArtifactVersionPageProps> =
303
303
const doEditMetaData = ( metaData : EditableMetaData ) : void => {
304
304
groups . updateArtifactVersionMetaData ( groupId as string , artifactId as string , version as string , metaData ) . then ( ( ) => {
305
305
if ( artifact ) {
306
- setArtifact ( {
307
- ...artifact ,
306
+ setArtifactVersion ( {
307
+ ...artifactVersion ,
308
308
...metaData
309
- } as ArtifactMetaData ) ;
309
+ } as VersionMetaData ) ;
310
310
}
311
311
} ) . catch ( error => {
312
312
setPageError ( toPageError ( error , "Error editing artifact metadata." ) ) ;
@@ -447,9 +447,10 @@ export const ArtifactVersionPage: FunctionComponent<ArtifactVersionPageProps> =
447
447
>
448
448
< p > Do you want to delete this artifact and all of its versions? This action cannot be undone.</ p >
449
449
</ Modal >
450
- < EditMetaDataModal name = { artifactName ( ) }
451
- description = { artifactDescription ( ) }
452
- labels = { artifactLabels ( ) }
450
+ < EditMetaDataModal
451
+ name = { versionName ( ) }
452
+ description = { versionDescription ( ) }
453
+ labels = { versionLabels ( ) }
453
454
isOpen = { isEditModalOpen }
454
455
onClose = { onEditModalClose }
455
456
onEditMetaData = { doEditMetaData }
0 commit comments