- New MeasurementDetailScreen with wijzigen/verwijderen - WeightChart now supports 30 and 365 days - NewMeasurementScreen now handles both create and edit - Updated README to match current code - Add build-toolchain documentation - Ignore *.apk build artifacts
53 lines
1.7 KiB
TypeScript
53 lines
1.7 KiB
TypeScript
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'
|
|
import MeasurementDetailScreen from './src/screens/MeasurementDetailScreen'
|
|
import { Measurement } from './src/types'
|
|
|
|
type RootStackParamList = {
|
|
Dashboard: undefined
|
|
NewMeasurement: { measurement?: Measurement }
|
|
History: undefined
|
|
MeasurementDetail: { measurementId: string }
|
|
Settings: undefined
|
|
}
|
|
|
|
const Stack = createNativeStackNavigator<RootStackParamList>()
|
|
|
|
export default function App() {
|
|
return (
|
|
<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="MeasurementDetail"
|
|
component={MeasurementDetailScreen}
|
|
options={{ title: 'Meting' }}
|
|
/>
|
|
<Stack.Screen
|
|
name="Settings"
|
|
component={SettingsScreen}
|
|
options={{ title: 'Instellingen' }}
|
|
/>
|
|
</Stack.Navigator>
|
|
</NavigationContainer>
|
|
)
|
|
}
|