minor tweak

This commit is contained in:
Reinaldo Neto 2023-01-11 14:18:57 -03:00
parent 0393aecbdd
commit e8672ce827
1 changed files with 14 additions and 12 deletions

View File

@ -9,7 +9,7 @@ import { BUTTON_HIT_SLOP } from '../message/utils';
import styles from './styles';
interface IAvatarContainer extends IAvatar {
handleEdit: () => void;
handleEdit?: () => void;
}
const AvatarWithEdit = ({
@ -45,17 +45,19 @@ const AvatarWithEdit = ({
isStatic={isStatic}
rid={rid}
/>
<Button
title={I18n.t('Edit')}
type='secondary'
backgroundColor={colors.editAndUploadButtonAvatar}
onPress={handleEdit}
testID='avatar-edit-button'
style={styles.editAvatarButton}
styleText={[styles.textButton]}
color={colors.titleText}
hitSlop={BUTTON_HIT_SLOP}
/>
{handleEdit ? (
<Button
title={I18n.t('Edit')}
type='secondary'
backgroundColor={colors.editAndUploadButtonAvatar}
onPress={handleEdit}
testID='avatar-edit-button'
style={styles.editAvatarButton}
styleText={[styles.textButton]}
color={colors.titleText}
hitSlop={BUTTON_HIT_SLOP}
/>
) : null}
</>
);
};