swimtracker-app/components/NewAppMain.js

47 lines
1.4 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";
2020-07-26 14:58:22 +02:00
import LastSessionsView from "../views/LastSessionsView";
2020-07-25 14:06:39 +02:00
const Stack = createStackNavigator();
function NewAppMain(props) {
const screenOptions = {
headerShown: false,
}
return (
2020-07-26 14:58:22 +02:00
<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.Screen
name="LastSessions"
component={LastSessionsView}
options={screenOptions}
/>
</Stack.Navigator>
</NavigationContainer>
2020-07-25 14:06:39 +02:00
)
};
export default NewAppMain;