profile edit button is not text based

This commit is contained in:
Nouman Tahir 2021-07-12 14:22:48 +05:00
parent cf79d21267
commit 9333f4cf55
3 changed files with 21 additions and 11 deletions

View File

@ -66,7 +66,7 @@ export default EStyleSheet.create({
dropdownStyle: {
marginLeft: 12,
},
followActionText: {
actionText: {
alignSelf: 'center',
fontWeight: 'bold',
color: '$primaryDarkGray',
@ -78,4 +78,12 @@ export default EStyleSheet.create({
padding: 4,
paddingHorizontal: 12,
},
editActionWrapper: {
borderColor: '$primaryDarkGray',
borderWidth: 1,
borderRadius: 16,
padding: 4,
paddingHorizontal: 12,
marginRight: 12,
},
});

View File

@ -214,13 +214,14 @@ class ProfileSummaryView extends PureComponent {
</TouchableOpacity>
</Fragment>
</View>
{isLoggedIn && !isOwnProfile ? (
<View style={styles.rightIcons}>
<TouchableOpacity
style={styles.followActionWrapper}
onPress={() => handleFollowUnfollowUser(!isFollowing)}
>
<Text style={styles.followActionText}>{followButtonText}</Text>
<Text style={styles.actionText}>{followButtonText}</Text>
</TouchableOpacity>
{isProfileLoading ? (
@ -239,16 +240,16 @@ class ProfileSummaryView extends PureComponent {
</View>
) : (
isOwnProfile && (
<Fragment>
<IconButton
backgroundColor="transparent"
color="#c1c5c7"
iconType="MaterialCommunityIcons"
name="pencil"
<View style={styles.rightIcons}>
<TouchableOpacity
style={styles.editActionWrapper}
onPress={handleOnPressProfileEdit}
size={20}
/>
</Fragment>
>
<Text style={styles.actionText}>
{intl.formatMessage({ id: 'profile.edit_label' })}
</Text>
</TouchableOpacity>
</View>
)
)}
</View>

View File

@ -151,6 +151,7 @@
"profile": {
"following": "Following",
"follower": "Follower",
"edit_label":"Edit",
"post": "Posts",
"details": "Profile Details",
"comments": "Comments",