feat: wire up App.tsx with navigation
This commit is contained in:
parent
58e1cd0c19
commit
ec04c7317a
4 changed files with 60 additions and 27 deletions
50
App.tsx
50
App.tsx
|
|
@ -1,20 +1,38 @@
|
|||
import { StatusBar } from 'expo-status-bar';
|
||||
import { StyleSheet, Text, View } from 'react-native';
|
||||
import React from 'react'
|
||||
import { NavigationContainer } from '@react-navigation/native'
|
||||
import { createNativeStackNavigator } from '@react-navigation/native-stack'
|
||||
import DashboardScreen from './src/screens/DashboardScreen'
|
||||
import NewMeasurementScreen from './src/screens/NewMeasurementScreen'
|
||||
import HistoryScreen from './src/screens/HistoryScreen'
|
||||
import SettingsScreen from './src/screens/SettingsScreen'
|
||||
|
||||
const Stack = createNativeStackNavigator()
|
||||
|
||||
export default function App() {
|
||||
return (
|
||||
<View style={styles.container}>
|
||||
<Text>Open up App.tsx to start working on your app!</Text>
|
||||
<StatusBar style="auto" />
|
||||
</View>
|
||||
);
|
||||
<NavigationContainer>
|
||||
<Stack.Navigator initialRouteName="Dashboard">
|
||||
<Stack.Screen
|
||||
name="Dashboard"
|
||||
component={DashboardScreen}
|
||||
options={{ title: 'Weegschaal' }}
|
||||
/>
|
||||
<Stack.Screen
|
||||
name="NewMeasurement"
|
||||
component={NewMeasurementScreen}
|
||||
options={{ title: 'Nieuwe meting' }}
|
||||
/>
|
||||
<Stack.Screen
|
||||
name="History"
|
||||
component={HistoryScreen}
|
||||
options={{ title: 'Historie' }}
|
||||
/>
|
||||
<Stack.Screen
|
||||
name="Settings"
|
||||
component={SettingsScreen}
|
||||
options={{ title: 'Instellingen' }}
|
||||
/>
|
||||
</Stack.Navigator>
|
||||
</NavigationContainer>
|
||||
)
|
||||
}
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
container: {
|
||||
flex: 1,
|
||||
backgroundColor: '#fff',
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
},
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue