Don't show Remove button for nonexistent avatar/banner (#833)

zio/stable
Logan Rosen 2023-06-02 10:51:11 -04:00 committed by GitHub
parent 3217c7ff32
commit 46c9de7c18
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -163,7 +163,7 @@ export function UserAvatar({
onSelectNewAvatar?.(croppedImage)
},
},
{
!!avatar && {
testID: 'changeAvatarRemoveBtn',
label: 'Remove',
icon: ['far', 'trash-can'] as IconProp,
@ -173,6 +173,7 @@ export function UserAvatar({
},
],
[
avatar,
onSelectNewAvatar,
requestCameraAccessIfNeeded,
requestPhotoAccessIfNeeded,

View File

@ -67,7 +67,7 @@ export function UserBanner({
)
},
},
{
!!banner && {
testID: 'changeBannerRemoveBtn',
label: 'Remove',
icon: ['far', 'trash-can'] as IconProp,