-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGuestBar.js
38 lines (35 loc) · 1.18 KB
/
GuestBar.js
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
import React, { Component, PropTypes } from 'react';
import { View, Text, TouchableHighlight,Navigator, Image, TouchableOpacity } from 'react-native';
var styles = require('./styles');
var nav;
export default class NavigationBar extends Component {
_onPressButton() {
console.log("You tapped the button!");
nav.push({
page: <HomePage/> ,
index:0
});
this.state={name:"Guest_69"};
}
//
render() {
var guestTextStyle = [styles.guestText];
if(this.props.profileDetails.name.length>14){
guestTextStyle.push(styles.smallerGuestText);
}
return(
<View>
<View style={styles.guestBarView}>
<View>
<Image style={styles.guestBarImage} source={this.props.profileDetails.pic}/>
<Image style={styles.guestCircleShadow} source={require('./images/darkCircleShadow.png')}/>
</View>
<View>
<Text style={guestTextStyle}>{this.props.profileDetails.name+" ("+this.props.profileDetails.wins+")"}</Text>
</View>
</View>
<View style={styles.guestBarShadow}></View>
</View>
)
}
}