-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathWelcomeIntro.js
106 lines (98 loc) · 2.29 KB
/
WelcomeIntro.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
import React, { Component } from 'react';
import {
AppRegistry, // Registers the app
StatusBar, // Allows to hide the satatus bar
AsyncStorage,
Alert,
View,
Image,
StyleSheet,
ActivityIndicator,
} from 'react-native';
import Screens from './Screens';
import ArScreen from './ArScreen';
import HomeTest from './HomeTest';
//import HomeTabNavigator from './HomeTabNavigator';
import renderIf from './js/helpers/renderIf';
import { withNavigation } from 'react-navigation';
class WelcomeIntro extends Component {
constructor(props) {
super(props);
this.state = {
skipIntro: null,
isReady: false,
}
this.createClass = this.createClass.bind(this);
this.goToTabNavigator = this.goToTabNavigator.bind(this);
}
async componentWillMount() {
}
async componentDidMount() {
this._updateList();
// Hide the status bar
StatusBar.setHidden(true);
}
async _updateList () {
AsyncStorage.getItem('@ICE20:skipIntro').then((val) => {
this.setState({ skipIntro: val, isReady: true })
});
}
goToTabNavigator() {
this.props.navigation.navigate('HomeTabNavigator');
}
createClass() {
if (!this.state.skipIntro) {
return (
<Screens navigation={this.props.navigation} />
)
}
else {
return (<HomeTest navigation={this.props.navigation} />)
/*return (*/
//this.props.navigation.navigate('HomeTabNavigator')
//return this.goToTabNavigator();
/*)*/
}
return null;
}
render() {
if (!this.state.isReady) {
return (
<View style={localStyles.outer}>
<Image
style={{width: 150, height: 150}}
source={require('./assets/logoICE20.png')}
/>
</View>
)
} else {
return (
this.createClass()
);
}
}
}
export default withNavigation(WelcomeIntro);
//export default WelcomeIntro;
var localStyles = StyleSheet.create({
outer : {
flex : 1,
justifyContent: 'center',
alignItems: 'center',
},
arView: {
flex:1,
},
buttons : {
height: 80,
width: 80,
paddingTop:20,
paddingBottom:20,
marginTop: 10,
marginBottom: 10,
backgroundColor:'#00000000',
borderRadius: 10,
borderWidth: 1,
borderColor: '#ffffff00',
}
});