-
-
Notifications
You must be signed in to change notification settings - Fork 21
/
App.js
43 lines (42 loc) · 1.42 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
import React from 'react';
import {NavigationContainer} from '@react-navigation/native';
import {createNativeStackNavigator} from '@react-navigation/native-stack';
import welcomeScreen from './src/screens/welcomeScreen';
import quizScreen from './src/screens/quizScreen';
import {StateProvider} from './src/stateProvider';
import reducer, {initialState} from './src/reducer';
import congratScreen from './src/screens/congratScreen';
import LeaderBoardScreen from './src/screens/leaderBoardScreen';
const Stack = createNativeStackNavigator();
const App = () => {
return (
<StateProvider initialState={initialState} reducer={reducer}>
<NavigationContainer>
<Stack.Navigator>
<Stack.Screen
name="WelcomeScreen"
component={welcomeScreen}
options={{headerShown: false}}
/>
<Stack.Screen
name="QuestionScreen"
component={quizScreen}
options={{headerShown: false}}
initialParams={{index: 0}}
/>
<Stack.Screen
name="CongratsScreen"
component={congratScreen}
options={{headerShown: false}}
/>
<Stack.Screen
name="leaderBoardScreen"
component={LeaderBoardScreen}
options={{headerShown: false}}
/>
</Stack.Navigator>
</NavigationContainer>
</StateProvider>
);
};
export default App;