-
Notifications
You must be signed in to change notification settings - Fork 0
/
MenusTabNavigator.js
47 lines (40 loc) · 1.11 KB
/
MenusTabNavigator.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
/* eslint-disable react/prop-types */
import React from 'react';
import {
BottomNavigation,
BottomNavigationTab,
} from 'react-native-ui-kitten';
import {
createBottomTabNavigator,
} from 'react-navigation';
import Home from '../screens/Home/Home';
import ProfileNavigator from './ProfileNavigator';
// import Operations from '../screens/Operations';
const BottomNavigationShowcase = (props) => {
const { navigation } = props;
const onTabSelect = (selectedIndex) => {
const { [selectedIndex]: selectedRoute } = navigation.state.routes;
navigation.navigate(selectedRoute.routeName);
};
return (
<BottomNavigation
selectedIndex={navigation.state.index}
onSelect={onTabSelect}
>
<BottomNavigationTab title='Home' />
{/* <BottomNavigationTab title='Operações' /> */}
<BottomNavigationTab title='Perfil' />
</BottomNavigation>
);
};
const TabNavigatorScreen = createBottomTabNavigator(
{
Home,
// Operations,
ProfileNavigator,
}, {
initialRouteName: 'Home',
tabBarComponent: BottomNavigationShowcase,
},
);
export default TabNavigatorScreen;