// @flow import * as React from 'react'; import {createDrawerNavigator} from '@react-navigation/drawer'; import TabNavigator from './MainTabNavigator'; import SettingsScreen from '../screens/SettingsScreen'; import AboutScreen from '../screens/About/AboutScreen'; import AboutDependenciesScreen from '../screens/About/AboutDependenciesScreen'; import SelfMenuScreen from '../screens/SelfMenuScreen'; import AvailableRoomScreen from "../screens/Websites/AvailableRoomScreen"; import BibScreen from "../screens/Websites/BibScreen"; import DebugScreen from '../screens/DebugScreen'; import Sidebar from "../components/Sidebar"; import {createStackNavigator, TransitionPresets} from "@react-navigation/stack"; import PerfHomeScreen from '../screens/PerfHomeScreen'; import {Platform, StyleSheet, View} from "react-native"; import ThemeManager from "../utils/ThemeManager"; import Touchable from "react-native-platform-touchable"; import {MaterialCommunityIcons} from "@expo/vector-icons"; const styles = StyleSheet.create({ header: { backgroundColor: ThemeManager.getCurrentThemeVariables().brandPrimary, }, headerTitle: { color: "#ffffff", }, }); const defaultScreenOptions = { headerTintColor: 'white', headerStyle: styles.header, gestureEnabled: true, cardOverlayEnabled: true, ...TransitionPresets.SlideFromRightIOS, }; function getDrawerButton(navigation: Object) { return ( ); } const AboutStack = createStackNavigator(); function AboutStackComponent() { return ( { const openDrawer = getDrawerButton.bind(this, navigation); return { title: 'About', headerLeft: openDrawer }; }} /> ); } const SettingsStack = createStackNavigator(); function SettingsStackComponent() { return ( { const openDrawer = getDrawerButton.bind(this, navigation); return { title: 'Settings', headerLeft: openDrawer }; }} /> ); } const SelfMenuStack = createStackNavigator(); function SelfMenuStackComponent() { return ( { const openDrawer = getDrawerButton.bind(this, navigation); return { title: 'Menu RU', headerLeft: openDrawer }; }} /> ); } const AvailableRoomStack = createStackNavigator(); function AvailableRoomStackComponent() { return ( { const openDrawer = getDrawerButton.bind(this, navigation); return { title: 'Available Rooms', headerLeft: openDrawer }; }} /> ); } const BibStack = createStackNavigator(); function BibStackComponent() { return ( { const openDrawer = getDrawerButton.bind(this, navigation); return { title: 'Bib', headerLeft: openDrawer }; }} /> ); } const Drawer = createDrawerNavigator(); function getDrawerContent(nav) { return } export default function DrawerNavigator() { return ( getDrawerContent(props.navigation)} screenOptions={defaultScreenOptions} > ); }