-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.js
More file actions
63 lines (59 loc) · 1.4 KB
/
App.js
File metadata and controls
63 lines (59 loc) · 1.4 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
58
59
60
61
62
63
import React, { Component } from 'react';
import {
SafeAreaView,
StyleSheet,
ScrollView,
View,
Text,
StatusBar,
Button,
TextInput,
} from 'react-native';
import { createSwitchNavigator, createAppContainer } from 'react-navigation';
import { createStackNavigator } from 'react-navigation-stack';
import LogoScreen from './src/screens/LogoScreen';
import LoginScreen from './src/screens/LoginScreen';
import SignUpScreen from './src/screens/SignUpScreen';
import ForgotPasswordScreen from './src/screens/ForgotPasswordScreen';
import HomeScreen from './src/screens/HomeScreen';
// Create navigation objects
const AuthStack = createStackNavigator({
SignUp: {
screen: SignUpScreen,
navigationOptions: {
header: null,
},
},
Login: {
screen: LoginScreen,
navigationOptions: {
header: null,
},
},
Forgot: {
screen: ForgotPasswordScreen,
navigationOptions: {
header: null,
},
},
});
const AppStack = createStackNavigator({
Home: {
screen: HomeScreen,
navigationOptions: {
header: null,
},
},
});
const AppNavigator = createSwitchNavigator({
Logo: LogoScreen, // check if user is authenticated
Auth: AuthStack, // if not authenticated
App: AppStack, // if authenticated
});
const AppContainer = createAppContainer(AppNavigator);
class App extends React.Component {
render() {
return <AppContainer />;
}
}
export default App;