-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.js
66 lines (62 loc) · 1.56 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
import React from 'react';
import { createSwitchNavigator, createStackNavigator, createAppContainer } from 'react-navigation';
import HomeScreen from './Components/HomeScreen/HomeScreen';
import GameView from './Components/GameView/GameView';
import HighScore from './Components/HighScore/HighScore';
import Result from './Components/Result/Result';
import AuthLoadingScreen from './Components/AuthLoadingScreen/AuthLoadingScreen';
import SignInScreen from './Components/SignInScreen/SignInScreen';
import SignUpScreen from './Components/SignUpScreen/SignUpScreen'
const AppStack = createStackNavigator(
{
Home: HomeScreen,
Game: GameView,
HighScore: HighScore,
Result: Result
},
{
initialRouteName: 'Home',
defaultNavigationOptions: {
headerStyle: {
backgroundColor: '#2e31e8',
},
headerTintColor: '#fff',
headerTitleStyle: {
fontWeight: 'bold',
},
},
}
);
const AuthStack = createStackNavigator(
{ SignIn: SignInScreen ,
SignUp: SignUpScreen
},
{
initialRouteName: 'SignIn',
defaultNavigationOptions: {
headerStyle: {
backgroundColor: '#2e31e8',
},
headerTintColor: '#fff',
headerTitleStyle: {
fontWeight: 'bold',
},
}
}
);
const AppContainer = createAppContainer(createSwitchNavigator(
{
AuthLoading: AuthLoadingScreen,
App: AppStack,
Auth: AuthStack,
},
{
initialRouteName: 'AuthLoading',
}
)
);
export default class App extends React.Component {
render() {
return <AppContainer />
}
}