-
Notifications
You must be signed in to change notification settings - Fork 3
/
App.js
44 lines (37 loc) · 1.13 KB
/
App.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
import React, {Component} from 'react';
import {Platform, StyleSheet, Text, View} from 'react-native';
import {StackNavigator} from 'react-navigation';
import Splash from './src/components/Splash';
import Login from './src/components/Login/Login';
import SignUp from './src/components/SignUp/SignUp';
import MemberArea from './src/components/MemberArea/MemberArea';
import {Router, Scene} from 'react-native-router-flux';
export default class App extends Component < {} > {
constructor(props) {
super(props);
this.state = {
timePassed: false
}
}
componentDidMount() {
setTimeout(() => {
this.setTimePassed();
}, 3000);
}
setTimePassed() {
this.setState({timePassed: true});
}
render() {
if (!this.state.timePassed) {
return <Splash/>;
} else {
return <Router>
<Scene key="root">
<Scene hideNavBar key="login" component={Login} title="Login" initial="initial"/>
<Scene hideNavBar key="signup" component={SignUp} title="Sign Up"/>
<Scene key="memberarea" component={MemberArea} title="Member Area"/>
</Scene>
</Router>;
}
}
}