swimtracker-app/components/NewAppMain.js

42 lines
1.2 KiB
JavaScript
Raw Normal View History

2020-07-25 14:06:39 +02:00
import React from 'react';
import { NavigationContainer } from '@react-navigation/native';
import { createStackNavigator } from '@react-navigation/stack';
// Own views
import MainMenuView from "../views/MainMenuView";
import SettingsView from "../views/SettingsView";
import TrainingView from "../views/TrainingView";
const Stack = createStackNavigator();
function NewAppMain(props) {
const screenOptions = {
headerShown: false,
}
return (
<NavigationContainer>
<Stack.Navigator initialRouteName="Home">
<Stack.Screen
name="Home"
component={MainMenuView}
options={screenOptions}
/>
<Stack.Screen
name="Settings"
component={SettingsView}
options={screenOptions}
/>
<Stack.Screen
name="Training"
component={TrainingView}
options={screenOptions}
/>
</Stack.Navigator>
</NavigationContainer>
)
};
export default NewAppMain;