2023-08-12 03:22:50 +00:00
|
|
|
import { createDrawerNavigator } from "@react-navigation/drawer";
|
|
|
|
import { IconButton } from "react-native-paper";
|
2023-11-12 04:05:37 +00:00
|
|
|
import { DrawerParams } from "./drawer-param-list";
|
|
|
|
import ExerciseList from "./ExerciseList";
|
2023-10-28 02:59:03 +00:00
|
|
|
import GraphsList from "./GraphsList";
|
|
|
|
import InsightsPage from "./InsightsPage";
|
|
|
|
import PlanList from "./PlanList";
|
|
|
|
import SetList from "./SetList";
|
2023-08-12 03:22:50 +00:00
|
|
|
import SettingsPage from "./SettingsPage";
|
|
|
|
import TimerPage from "./TimerPage";
|
|
|
|
import useDark from "./use-dark";
|
2023-11-12 04:05:37 +00:00
|
|
|
import WeightList from "./WeightList";
|
2022-07-15 04:34:06 +00:00
|
|
|
|
2023-10-28 02:59:03 +00:00
|
|
|
const Drawer = createDrawerNavigator<DrawerParams>();
|
2022-09-25 04:49:26 +00:00
|
|
|
|
2023-10-28 02:59:03 +00:00
|
|
|
export default function AppDrawer() {
|
2023-08-12 03:22:50 +00:00
|
|
|
const dark = useDark();
|
2022-07-15 04:34:06 +00:00
|
|
|
|
|
|
|
return (
|
2022-10-04 01:35:56 +00:00
|
|
|
<Drawer.Navigator
|
|
|
|
screenOptions={{
|
2023-08-12 03:22:50 +00:00
|
|
|
headerTintColor: dark ? "white" : "black",
|
2022-10-04 01:35:56 +00:00
|
|
|
swipeEdgeWidth: 1000,
|
2022-10-22 23:35:58 +00:00
|
|
|
headerShown: false,
|
2023-06-27 03:16:59 +00:00
|
|
|
}}
|
|
|
|
>
|
2023-01-01 05:05:11 +00:00
|
|
|
<Drawer.Screen
|
2023-08-12 03:22:50 +00:00
|
|
|
name="Home"
|
2023-10-28 02:59:03 +00:00
|
|
|
component={SetList}
|
2023-10-26 05:49:56 +00:00
|
|
|
options={{ drawerIcon: () => <IconButton icon="home-outline" /> }}
|
2023-01-01 05:05:11 +00:00
|
|
|
/>
|
2023-11-09 05:52:50 +00:00
|
|
|
<Drawer.Screen
|
|
|
|
name="Exercises"
|
|
|
|
component={ExerciseList}
|
|
|
|
options={{ drawerIcon: () => <IconButton icon="dumbbell" /> }}
|
|
|
|
/>
|
2023-01-01 05:05:11 +00:00
|
|
|
<Drawer.Screen
|
2023-08-12 03:22:50 +00:00
|
|
|
name="Plans"
|
2023-10-28 02:59:03 +00:00
|
|
|
component={PlanList}
|
2023-10-26 05:49:56 +00:00
|
|
|
options={{ drawerIcon: () => <IconButton icon="calendar-outline" /> }}
|
2023-01-01 05:05:11 +00:00
|
|
|
/>
|
|
|
|
<Drawer.Screen
|
2023-08-12 03:22:50 +00:00
|
|
|
name="Graphs"
|
2023-10-28 02:59:03 +00:00
|
|
|
component={GraphsList}
|
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
|
2023-08-12 03:22:50 +00:00
|
|
|
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"
|
2023-10-28 02:59:03 +00:00
|
|
|
component={WeightList}
|
2023-10-26 05:49:56 +00:00
|
|
|
options={{ drawerIcon: () => <IconButton icon="scale-bathroom" /> }}
|
2023-01-01 05:05:11 +00:00
|
|
|
/>
|
2023-10-24 08:32:31 +00:00
|
|
|
<Drawer.Screen
|
|
|
|
name="Insights"
|
|
|
|
component={InsightsPage}
|
|
|
|
options={{
|
|
|
|
drawerIcon: () => <IconButton icon="lightbulb-on-outline" />,
|
|
|
|
}}
|
|
|
|
/>
|
2023-01-01 05:05:11 +00:00
|
|
|
<Drawer.Screen
|
2023-08-12 03:22:50 +00:00
|
|
|
name="Settings"
|
2023-01-01 05:05:11 +00:00
|
|
|
component={SettingsPage}
|
2023-10-26 05:49:56 +00:00
|
|
|
options={{ drawerIcon: () => <IconButton icon="cog-outline" /> }}
|
2023-01-01 05:05:11 +00:00
|
|
|
/>
|
2022-10-04 01:35:56 +00:00
|
|
|
</Drawer.Navigator>
|
2023-08-12 03:22:50 +00:00
|
|
|
);
|
2022-07-15 04:34:06 +00:00
|
|
|
}
|