diff --git a/AppDrawer.tsx b/AppDrawer.tsx index 83ddf48..6e4c50b 100644 --- a/AppDrawer.tsx +++ b/AppDrawer.tsx @@ -1,6 +1,6 @@ import { createDrawerNavigator } from "@react-navigation/drawer"; import { StackScreenProps } from "@react-navigation/stack"; -import { IconButton, useTheme } from "react-native-paper"; +import { IconButton, useTheme, Banner } from "react-native-paper"; import { DrawerParams } from "./drawer-params"; import ExerciseList from "./ExerciseList"; import GraphsList from "./GraphsList"; @@ -10,6 +10,7 @@ import SetList from "./SetList"; import SettingsPage from "./SettingsPage"; import TimerPage from "./TimerPage"; import WeightList from "./WeightList"; +import { StyleSheet, Text, View } from "react-native"; const Drawer = createDrawerNavigator(); @@ -23,60 +24,86 @@ export default function AppDrawer({ const { dark } = useTheme(); return ( - - }} - /> - }} - /> - }} - /> - , + <> + {__DEV__ && ( + + DEBUG + + )} + - }} - /> - }} - /> - , - }} - /> - }} - /> - + initialRouteName={ + (route.params.startup as keyof DrawerParams) || "History" + } + > + }} + /> + }} + /> + }} + /> + , + }} + /> + }} + /> + }} + /> + , + }} + /> + }} + /> + + ); } + +const styles = StyleSheet.create({ + container: { + flex: 1, + }, + debugBanner: { + position: 'absolute', + top: 0, + right: 0, + transform: [{ rotate: '45deg' }], + backgroundColor: 'red', + zIndex: 1000, + }, + debugText: { + color: 'white', + padding: 5, + fontSize: 10, + }, +});