-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProfile.js
More file actions
57 lines (51 loc) · 1.29 KB
/
Copy pathProfile.js
File metadata and controls
57 lines (51 loc) · 1.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
import React, { Component } from 'react';
import {
StyleSheet,
Text,
Image,
View,
TextInput,
TouchableHighlight,
AsyncStorage
} from 'react-native';
import Icon from 'react-native-vector-icons/FontAwesome';
const profileData={
name:"Ayush Gupta",
gender:"Male",
age:"22"
}
export default class Profile extends Component{
static navigationOptions= {
title:"Profile",
}
render(){
return(
<View style={{flex :1, marginHorizontal:20}}>
<Image source={require('./images/profile.jpg')} style={styles.pic} />
<Text style={styles.summary} > Name : {profileData.name} </Text>
<Text style={styles.summary} > Gender : {profileData.gender} </Text>
<Text style={styles.summary} > Age : {profileData.age} </Text>
<TouchableHighlight underlayColor='transparent'
onPress={()=>{AsyncStorage.setItem('isLoggedIn', 'false');this.props.navigation.navigate('Login')}} >
<View style={{flexDirection:'row',marginTop:40}} >
<Icon name="sign-out" size={30} color="#555"/>
<Text style={{color:"#555",fontSize:20}} > Sign Out </Text>
</View>
</TouchableHighlight>
</View>
)
}
}
const styles = StyleSheet.create({
pic:{
height:120,
width:120,
borderRadius:60,
marginTop:20
},
summary:{
color:"#555",
fontSize:20,
marginTop:10
},
})