Skip to content

Commit

Permalink
navigation: Update MainTabs creation
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
borisyankov committed May 29, 2019
1 parent 05505a5 commit e18f702
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/main/MainTabs.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* @flow strict-local */
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';
Expand All @@ -14,7 +14,7 @@ import { OwnAvatar } from '../common';
import IconUnreadConversations from '../nav/IconUnreadConversations';
import ProfileCard from '../account-info/ProfileCard';

export default TabNavigator(
export default createMaterialTopTabNavigator(
{
home: {
screen: HomeTab,
Expand Down Expand Up @@ -62,7 +62,6 @@ export default TabNavigator(
},
{
backBehavior: 'none',
tabBarComponent: TabBarBottom,
tabBarPosition: 'bottom',
...tabsOptions({
showLabel: !!Platform.isPad,
Expand Down

0 comments on commit e18f702

Please sign in to comment.