This repository has been archived by the owner on Oct 18, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.js
46 lines (35 loc) · 1.77 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
import { NavigationContainer, DefaultTheme } from '@react-navigation/native';
import { createStackNavigator } from '@react-navigation/stack';
import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';
import HomeScreen from "./src/screens/HomeScreen"
import TopicSelection from "./src/screens/TopicSelection"
import * as React from 'react';
import TopicExplaination from './src/screens/TopicExplaination';
import MainQuiz from './src/screens/MainQuiz';
const Stack = createStackNavigator();
const Tab = createBottomTabNavigator();
const tabTheme = {...DefaultTheme,colors: {...DefaultTheme.colors, card: 'white', text: 'black'}};
export const Lesson = React.createContext();
function App() {
return (
<NavigationContainer theme = {tabTheme}>
<Stack.Navigator initialRouteName="Home">
<Stack.Screen name = "Home" component={HomeScreen} options={{ headerShown: false, cardStyle: { backgroundColor: 'white' }}} />
<Stack.Screen name="TopicSelection" component={TopicSelection} options={{cardStyle: { backgroundColor: 'white' }}} />
<Stack.Screen name="Lessons" component={Lessons} options={{cardStyle: { backgroundColor: 'white' }}} />
</Stack.Navigator>
</NavigationContainer>
);
}
function Lessons({route}){
return (
<Lesson.Provider value={route}>
<Tab.Navigator initialRouteName = "TopicExplaination">
<Tab.Screen name="TopicExplaination" component={TopicExplaination} options={{cardStyle: { backgroundColor: 'white' }}} />
<Tab.Screen name="Topics" component={MainQuiz} options={{cardStyle: { backgroundColor: 'white' }}}/>
<Tab.Screen name="Quiz" component={MainQuiz} options={{cardStyle: { backgroundColor: 'white' }}}/>
</Tab.Navigator>
</Lesson.Provider>
);
}
export default App;