Merge pull request #1169 from esteemapp/bugfix/profile-edit-design

Added safeareaview to profile edit
This commit is contained in:
uğur erdal 2019-09-25 11:24:43 +03:00 committed by GitHub
commit 0a0198320e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,6 +1,6 @@
import React from 'react';
import { withNavigation } from 'react-navigation';
import { View, Text } from 'react-native';
import { View, Text, SafeAreaView } from 'react-native';
import LinearGradient from 'react-native-linear-gradient';
import { UserAvatar } from '../userAvatar';
@ -23,36 +23,38 @@ const AvatarHeader = ({
colors={['#357ce6', '#2d5aa0']}
style={styles.headerView}
>
<View style={styles.headerContainer}>
<IconButton
iconStyle={styles.backIcon}
iconType="MaterialIcons"
name="arrow-back"
onPress={navigation.goBack}
size={25}
/>
<View style={styles.wrapper}>
<UserAvatar
key={avatarUrl || username}
noAction
size="xl"
username={username}
avatarUrl={avatarUrl}
/>
<SafeAreaView>
<View style={styles.headerContainer}>
<IconButton
iconStyle={styles.addIcon}
style={styles.addButton}
iconType="MaterialCommunityIcons"
name="plus"
onPress={showImageUploadActions}
size={15}
iconStyle={styles.backIcon}
iconType="MaterialIcons"
name="arrow-back"
onPress={navigation.goBack}
size={25}
/>
<View style={styles.textWrapper}>
{!!name && <Text style={styles.name}>{name}</Text>}
<Text style={styles.username}>{`@${username} (${reputation})`}</Text>
<View style={styles.wrapper}>
<UserAvatar
key={avatarUrl || username}
noAction
size="xl"
username={username}
avatarUrl={avatarUrl}
/>
<IconButton
iconStyle={styles.addIcon}
style={styles.addButton}
iconType="MaterialCommunityIcons"
name="plus"
onPress={showImageUploadActions}
size={15}
/>
<View style={styles.textWrapper}>
{!!name && <Text style={styles.name}>{name}</Text>}
<Text style={styles.username}>{`@${username} (${reputation})`}</Text>
</View>
</View>
</View>
</View>
</SafeAreaView>
</LinearGradient>
);