Don't show Remove button for nonexistent avatar/banner (#833)
parent
3217c7ff32
commit
46c9de7c18
|
@ -163,7 +163,7 @@ export function UserAvatar({
|
||||||
onSelectNewAvatar?.(croppedImage)
|
onSelectNewAvatar?.(croppedImage)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
!!avatar && {
|
||||||
testID: 'changeAvatarRemoveBtn',
|
testID: 'changeAvatarRemoveBtn',
|
||||||
label: 'Remove',
|
label: 'Remove',
|
||||||
icon: ['far', 'trash-can'] as IconProp,
|
icon: ['far', 'trash-can'] as IconProp,
|
||||||
|
@ -173,6 +173,7 @@ export function UserAvatar({
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
|
avatar,
|
||||||
onSelectNewAvatar,
|
onSelectNewAvatar,
|
||||||
requestCameraAccessIfNeeded,
|
requestCameraAccessIfNeeded,
|
||||||
requestPhotoAccessIfNeeded,
|
requestPhotoAccessIfNeeded,
|
||||||
|
|
|
@ -67,7 +67,7 @@ export function UserBanner({
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
!!banner && {
|
||||||
testID: 'changeBannerRemoveBtn',
|
testID: 'changeBannerRemoveBtn',
|
||||||
label: 'Remove',
|
label: 'Remove',
|
||||||
icon: ['far', 'trash-can'] as IconProp,
|
icon: ['far', 'trash-can'] as IconProp,
|
||||||
|
|
Loading…
Reference in New Issue