-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
101 lines (89 loc) · 3.05 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
import "react-native-gesture-handler";
import * as React from "react";
import { NavigationContainer } from "@react-navigation/native";
import { createStackNavigator } from "@react-navigation/stack";
import { useFonts } from '@use-expo/font';
import { Entypo } from '@expo/vector-icons';
import ExerciseSelectionScreen from "./screens/ExerciseSelectionScreen"
import PercentageExercise from "./screens/PercentageExercise";
import MultiplicationExercise from "./screens/MultiplicationExercise"
import LargeZeroesExercise from "./screens/LargeZeroesExercise";
import HomeScreen from "./screens/HomeScreen";
import { AppLoading } from "expo";
// {/* <MultiplicationExercise /> */}
// <ExerciseSelectionBox difficulty={"hard"} />
// <ExerciseSelectionScreen />
const Stack = createStackNavigator();
function App() {
let [fontsLoaded] = useFonts({
'NotoSerif-Regular': require('./assets/fonts/NotoSerif-Regular.ttf'),
'NotoSerif-Bold': require('./assets/fonts/NotoSerif-Bold.ttf'),
});
if (!fontsLoaded) {
return <AppLoading />
} else {
return (
<NavigationContainer>
<Stack.Navigator>
{/* Homescreen */}
<Stack.Screen
name="Home"
component={HomeScreen}
options={{
title: "",
headerShown: false,
}} />
{/* Exercise selection screen */}
<Stack.Screen
name="Exercises"
component={ExerciseSelectionScreen}
options={{
title: "",
headerStyle: { backgroundColor: "white" },
headerBackImage: () => (
<Entypo name="chevron-thin-left" size={24} color="black" />
),
}} />
{/* Multiplication exercise screen */}
<Stack.Screen
name="MultiplicationExercise"
component={MultiplicationExercise}
options={{
title: "",
headerTransparent: true,
headerTintColor: "white",
headerBackImage: () => (
<Entypo name="chevron-thin-left" size={24} color="white" />
)
}}
/>
{/* Percentage exercise screen */}
<Stack.Screen
name="PercentageExercise"
component={PercentageExercise}
options={{
title: "",
headerTransparent: true,
headerTintColor: "white",
headerBackImage: () => (
<Entypo name="chevron-thin-left" size={24} color="white" />
)
}} />
{/* Zero exercise screen */}
<Stack.Screen
name="LargeZeroesExercise"
component={LargeZeroesExercise}
options={{
title: "",
headerTransparent: true,
headerTintColor: "white",
headerBackImage: () => (
<Entypo name="chevron-thin-left" size={24} color="white" />
)
}} />
</Stack.Navigator>
</NavigationContainer>
);
}
}
export default App;