Skip to content

Commit e18f702

Browse files
committed
navigation: Update MainTabs creation
Replace `TabNavigator` constructor with `createMaterialTopTabNavigator` creator function which is the one that matched the old behavior. Note: While `createBottomTabNavigator` sounds like what we might need, it is a simpler navigator compared to what we were using and actually `createMaterialTopTabNavigator` is the correct one.
1 parent 05505a5 commit e18f702

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/main/MainTabs.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* @flow strict-local */
22
import React from 'react';
33
import { Platform } from 'react-native';
4-
import { TabNavigator, TabBarBottom } from 'react-navigation';
4+
import { createMaterialTopTabNavigator } from 'react-navigation';
55

66
import type { TabNavigationOptionsPropsType } from '../types';
77
import tabsOptions from '../styles/tabs';
@@ -14,7 +14,7 @@ import { OwnAvatar } from '../common';
1414
import IconUnreadConversations from '../nav/IconUnreadConversations';
1515
import ProfileCard from '../account-info/ProfileCard';
1616

17-
export default TabNavigator(
17+
export default createMaterialTopTabNavigator(
1818
{
1919
home: {
2020
screen: HomeTab,
@@ -62,7 +62,6 @@ export default TabNavigator(
6262
},
6363
{
6464
backBehavior: 'none',
65-
tabBarComponent: TabBarBottom,
6665
tabBarPosition: 'bottom',
6766
...tabsOptions({
6867
showLabel: !!Platform.isPad,

0 commit comments

Comments
 (0)