Massive/Routes.tsx

66 lines
1.9 KiB
TypeScript
Raw Normal View History

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";
2023-10-19 05:28:56 +00:00
import WeightPage from "./WeightPage";
2022-07-15 04:34:06 +00:00
const Drawer = createDrawerNavigator<DrawerParamList>();
2022-09-25 04:49:26 +00:00
export default function Routes() {
const dark = useDark();
2022-07-15 04:34:06 +00:00
return (
<Drawer.Navigator
screenOptions={{
headerTintColor: dark ? "white" : "black",
swipeEdgeWidth: 1000,
headerShown: false,
2023-06-27 03:16:59 +00:00
}}
>
2023-01-01 05:05:11 +00:00
<Drawer.Screen
name="Home"
2023-01-01 05:05:11 +00:00
component={HomePage}
options={{ drawerIcon: () => <IconButton icon="home" /> }}
2023-01-01 05:05:11 +00:00
/>
<Drawer.Screen
name="Plans"
2023-01-01 05:05:11 +00:00
component={PlanPage}
2023-10-19 05:28:56 +00:00
options={{ drawerIcon: () => <IconButton icon="calendar" /> }}
2023-01-01 05:05:11 +00:00
/>
<Drawer.Screen
name="Graphs"
component={GraphsPage}
2023-10-20 22:57:31 +00:00
options={{
drawerIcon: () => <IconButton icon="chart-bell-curve-cumulative" />,
}}
2023-01-01 05:05:11 +00:00
/>
<Drawer.Screen
name="Workouts"
2023-01-01 05:05:11 +00:00
component={WorkoutsPage}
2023-10-19 05:28:56 +00:00
options={{ drawerIcon: () => <IconButton icon="dumbbell" /> }}
2023-01-01 05:05:11 +00:00
/>
<Drawer.Screen
name="Timer"
2023-01-01 05:05:11 +00:00
component={TimerPage}
2023-10-19 05:28:56 +00:00
options={{ drawerIcon: () => <IconButton icon="timer-outline" /> }}
/>
<Drawer.Screen
name="Weight"
component={WeightPage}
options={{ drawerIcon: () => <IconButton icon="scale" /> }}
2023-01-01 05:05:11 +00:00
/>
<Drawer.Screen
name="Settings"
2023-01-01 05:05:11 +00:00
component={SettingsPage}
2023-10-19 05:28:56 +00:00
options={{ drawerIcon: () => <IconButton icon="cog" /> }}
2023-01-01 05:05:11 +00:00
/>
</Drawer.Navigator>
);
2022-07-15 04:34:06 +00:00
}