New views
This commit is contained in:
41
components/NewAppMain.js
Normal file
41
components/NewAppMain.js
Normal file
@@ -0,0 +1,41 @@
|
||||
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;
|
||||
Reference in New Issue
Block a user