-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.js
45 lines (39 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 'react-native-gesture-handler';
import { StatusBar } from 'expo-status-bar';
import React from 'react';
import { StyleSheet, Text, View } from 'react-native';
import { NavigationContainer } from '@react-navigation/native';
import { createStackNavigator } from '@react-navigation/stack';
import Home from './AppFiles/Home'
import Login from './AppFiles/Login'
import Food from './AppFiles/Food'
import MagicCamera from "./MagicCamera"
import Workout from './AppFiles/Workout';
import {excercises, exercises} from "./ClassModelLoader";
import Stats from "./AppFiles/Stats"
const Stack = createStackNavigator();
export default function App() {
return (
<NavigationContainer>
<Stack.Navigator initialRouteName="login">
<Stack.Screen name="home" component={Home} options={{title: "Home"}}></Stack.Screen>
<Stack.Screen name="login" component={Login} options={{title: "Login"}}></Stack.Screen>
<Stack.Screen name="food" component={Food} options={{title: "Nutrition Facts"}}></Stack.Screen>
<Stack.Screen name="squats" options={{title: "Squat Training"}}>
{props => <Workout exercise={exercises.SQUATS} />}
</Stack.Screen>
<Stack.Screen name="jumpingjacks" options={{title: "Jumping Jacks Training"}}>
{props => <Workout exercise={exercises.JUMPING_JACKS } callback={Home.updateStats} />}
</Stack.Screen>
<Stack.Screen name="dumbbells" options={{title: "Dumbbell Training"}}>
{props => <Workout exercise={exercises.DUMBBELLS} callback={Home.updateStats} />}
</Stack.Screen>
<Stack.Screen name="stats" options={{title: "Your Stats"}}>
{props => <Stats />}
</Stack.Screen>
</Stack.Navigator>
</NavigationContainer>
);
}
const styles = StyleSheet.create({
});