-
Notifications
You must be signed in to change notification settings - Fork 1
/
App.js
87 lines (83 loc) · 2.62 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
78
79
80
81
82
83
84
85
86
87
import React from 'react';
import { createMaterialBottomTabNavigator } from 'react-navigation-material-bottom-tabs';
import { Provider } from 'react-redux';
import { PersistGate } from 'redux-persist/lib/integration/react';
import { persistor, store } from './app/store';
import LoadingScreen from './app/screens/LoadingScreen/LoadingScreen';
import ActListScreen from './app/screens/ActListScreen/ActListScreen';
import GroupScreen from './app/screens/GroupScreen/GroupScreen';
import TransferScreen from './app/screens/TransferScreen/TransferScreen';
const TabNav = createMaterialBottomTabNavigator(
{
Items: ActListScreen,
Groups: GroupScreen,
Transfers: TransferScreen,
},
{
shifting: true,
labeled: true,
initialRouteName: 'Items',
activeTintColor: 'white',
inactiveTintColor: '#3e2465',
barStyle: { backgroundColor: '#607d8b' },
},
);
export const App = () => (
<Provider store={store}>
<PersistGate loading={<LoadingScreen />} persistor={persistor}>
<TabNav />
</PersistGate>
</Provider>
);
export default App;
/*
const AppScreen = TabNavigator(
{
Items: { screen: props => <ActListScreen {...props} /> },
Groups: { screen: props => <GroupScreen {...props} /> },
Transfers: { screen: props => <TransferScreen {...props} /> },
},
{
tabBarPosition: 'bottom',
tabBarComponent: props => (
<Footer>
<FooterTab style={{ backgroundColor: '#795548' }}>
<Button
vertical
backgroundColor={props.navigationState.index === 1 ? '#a1887f' : '#795548'}
active={props.navigationState.index === 0}
onPress={() => props.navigation.navigate('Items')}
>
<Icon name="list" type="Entypo" />
<Text>
{'Items'}
</Text>
</Button>
<Button
vertical
backgroundColor={props.navigationState.index === 1 ? '#a1887f' : '#795548'}
active={props.navigationState.index === 1}
onPress={() => props.navigation.navigate('Groups')}
>
<Icon name="group" type="FontAwesome" />
<Text>
{'Group'}
</Text>
</Button>
<Button
vertical
backgroundColor={props.navigationState.index === 2 ? '#a1887f' : '#795548'}
active={props.navigationState.index === 2}
onPress={() => props.navigation.navigate('Transfers')}
>
<Icon name="headset" />
<Text>
{'Transfers'}
</Text>
</Button>
</FooterTab>
</Footer>
),
},
);
*/