import './shim.js'; import React from 'react'; import PropTypes from 'prop-types'; import { Text, ScrollView, StyleSheet } from 'react-native'; import { createDrawerNavigator, SafeAreaView } from 'react-navigation'; import MainBottomTabs from './MainBottomTabs'; import Selftest from './screen/selftest'; import About from './screen/settings/about'; import PlausibleDeniability from './screen/plausibledeniability'; /** @type {AppStorage} */ require('./BlueApp'); if (!Error.captureStackTrace) { // captureStackTrace is only available when debugging Error.captureStackTrace = () => {}; } const pkg = require('./package.json'); const appjson = require('./app.json'); // const CustomDrawerContentComponent = props => ( props.navigation.navigate('About')} style={styles.heading}> {' '} {pkg.name} v{pkg.version} (build {appjson.expo.ios.buildNumber}) ); CustomDrawerContentComponent.propTypes = { navigation: PropTypes.shape({ navigate: PropTypes.func, }), }; const styles = StyleSheet.create({ container: { marginTop: 20, flex: 1, }, heading: { textAlign: 'center', color: 'black', fontWeight: 'bold', fontSize: 20, }, }); const TabsInDrawer = createDrawerNavigator( { MainBottomTabs: { screen: MainBottomTabs, navigationOptions: { drawer: () => ({ label: 'Tabs', }), }, }, Selftest: { screen: Selftest, navigationOptions: {}, }, About: { screen: About, navigationOptions: {}, }, PlausibleDeniability: { screen: PlausibleDeniability, navigationOptions: {}, }, }, { contentComponent: CustomDrawerContentComponent, drawerOpenRoute: 'DrawerOpen', drawerCloseRoute: 'DrawerClose', drawerToggleRoute: 'DrawerToggle', }, ); export default TabsInDrawer;