From 63d716652890efc46eb5008332d49c0fa333738b Mon Sep 17 00:00:00 2001 From: Boris Yankov Date: Thu, 21 Jun 2018 02:31:19 +0300 Subject: [PATCH] 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. --- src/main/MainTabs.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main/MainTabs.js b/src/main/MainTabs.js index 2d64e55ceb6..6e588849791 100644 --- a/src/main/MainTabs.js +++ b/src/main/MainTabs.js @@ -1,7 +1,7 @@ /* @flow */ import React from 'react'; import { Platform } from 'react-native'; -import { TabNavigator, TabBarBottom } from 'react-navigation'; +import { createMaterialTopTabNavigator } from 'react-navigation'; import type { TabNavigationOptionsPropsType } from '../types'; import tabsOptions from '../styles/tabs'; @@ -12,7 +12,7 @@ import SettingsCard from '../settings/SettingsCard'; import { IconHome, IconStream, IconSettings } from '../common/Icons'; import IconUnreadConversations from '../nav/IconUnreadConversations'; -export default TabNavigator( +export default createMaterialTopTabNavigator( { home: { screen: HomeTab, @@ -53,7 +53,6 @@ export default TabNavigator( }, { backBehavior: 'none', - tabBarComponent: TabBarBottom, tabBarPosition: 'bottom', ...tabsOptions({ showLabel: !!Platform.isPad,