Massive/Routes.tsx
Brandon Presley 1603496424 Rework Best -> Graphs
I was considering adding weight tracking,
so then this graph page would include body
weight graphs. Meaning it's not really
recording the "best" of anything.
It currently only shows the best on the list
page anyway.
2023-07-04 11:35:52 +12:00

58 lines
1.6 KiB
TypeScript

import { createDrawerNavigator } from '@react-navigation/drawer'
import { IconButton } from 'react-native-paper'
import GraphsPage from './GraphsPage'
import { DrawerParamList } from './drawer-param-list'
import HomePage from './HomePage'
import PlanPage from './PlanPage'
import SettingsPage from './SettingsPage'
import TimerPage from './TimerPage'
import useDark from './use-dark'
import WorkoutsPage from './WorkoutsPage'
const Drawer = createDrawerNavigator<DrawerParamList>()
export default function Routes() {
const dark = useDark()
return (
<Drawer.Navigator
screenOptions={{
headerTintColor: dark ? 'white' : 'black',
swipeEdgeWidth: 1000,
headerShown: false,
}}
>
<Drawer.Screen
name='Home'
component={HomePage}
options={{ drawerIcon: () => <IconButton icon='home' /> }}
/>
<Drawer.Screen
name='Plans'
component={PlanPage}
options={{ drawerIcon: () => <IconButton icon='event' /> }}
/>
<Drawer.Screen
name='Graphs'
component={GraphsPage}
options={{ drawerIcon: () => <IconButton icon='insights' /> }}
/>
<Drawer.Screen
name='Workouts'
component={WorkoutsPage}
options={{ drawerIcon: () => <IconButton icon='fitness-center' /> }}
/>
<Drawer.Screen
name='Timer'
component={TimerPage}
options={{ drawerIcon: () => <IconButton icon='access-time' /> }}
/>
<Drawer.Screen
name='Settings'
component={SettingsPage}
options={{ drawerIcon: () => <IconButton icon='settings' /> }}
/>
</Drawer.Navigator>
)
}