forked from BlueWallet/BlueWallet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
77 lines (67 loc) · 1.95 KB
/
App.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
/** @type {AppStorage} */
let BlueApp = require('./BlueApp')
import './shim.js'
if (!Error.captureStackTrace) { // captureStackTrace is only available when debugging
Error.captureStackTrace = () => {};
}
import React from 'react'
import { Text, ScrollView, StyleSheet } from 'react-native'
import { DrawerNavigator } from 'react-navigation'
import MainBottomTabs from './MainBottomTabs'
// import SecondaryBottomTabs from './SecondaryBottomTabs';
import { SafeAreaView } from 'react-navigation'
const pkg = require('./package.json')
// <DrawerItems {...props} />
const CustomDrawerContentComponent = (props) => (
<ScrollView>
<SafeAreaView style={styles.container} forceInset={{ top: 'always', horizontal: 'never' }}>
<Text onPress={() => props.navigation.navigate('AddWallet')} style={styles.heading}> {pkg.name} v{pkg.version}</Text>
</SafeAreaView>
</ScrollView>
)
const styles = StyleSheet.create({
container: {
marginTop: 20,
flex: 1
},
heading: {
textAlign: 'center',
color: 'black',
fontWeight: 'bold',
fontSize: 20
}
})
/* import scanQrWifLegacyAddress from './screen/wallets/scanQrWifLegacyAddress'
import scanQrWifSegwitP2SHAddress from './screen/wallets/scanQrWifSegwitP2SHAddress' */
const TabsInDrawer = DrawerNavigator({
MainBottomTabs: {
screen: MainBottomTabs,
navigationOptions: {
drawer: () => ({
label: 'Tabs'
})
}
}
/* SecondaryBottomTabs: {
screen: SecondaryBottomTabs,
path: 'chat/aaa',
navigationOptions: {
drawer: () => ({
label: 'SecondaryBottomTabs',
icon: ({ tintColor }) => (
<MaterialIcons
name="filter-2"
size={24}
style={{ color: tintColor }}
/>
),
}),
},
}, */
}, {
contentComponent: CustomDrawerContentComponent,
drawerOpenRoute: 'DrawerOpen',
drawerCloseRoute: 'DrawerClose',
drawerToggleRoute: 'DrawerToggle',
})
export default TabsInDrawer