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 Jul 25, 2018
1 parent 81ee2e2 commit 8216931
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 */
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 @@ -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,
Expand Down Expand Up @@ -53,7 +53,6 @@ export default TabNavigator(
},
{
backBehavior: 'none',
tabBarComponent: TabBarBottom,
tabBarPosition: 'bottom',
...tabsOptions({
showLabel: !!Platform.isPad,
Expand Down

0 comments on commit 8216931

Please sign in to comment.