-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.js
44 lines (40 loc) · 1.12 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
import React from "react";
import { View} from "react-native";
import Activity from "./src/Activity";
import Creator from "./src/Creator"
import {NavigationContainer} from '@react-navigation/native'
import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';
//All the code is in src file
function HomeScreen() {
// activity screen
return (
<View style={{flex: 1, justifyContent: 'center', alignItems: 'center' }}>
<Activity></Activity>
</View>
);
}
function MapCreator() {
//route creation screen
return (
<View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}>
<Creator></Creator>
</View>
);
}
const Tab = createBottomTabNavigator();
export default function App() {
//Starts the app and creates two screen with tab navigator
return (
<NavigationContainer>
<Tab.Navigator>
<Tab.Screen
name="Home"
options={{
title: "Run",
}}
component={HomeScreen}/>
<Tab.Screen name="MapCreator" component={MapCreator}/>
</Tab.Navigator>
</NavigationContainer>
);
}