Skip to content

Commit

Permalink
navigation: Update StreamTabs creation
Browse files Browse the repository at this point in the history
`TabNavigator` constructor is deprecated in favor of the function
'createMaterialTopTabNavigator'. Our config no longer needs some
parameters passed, so this is simplified while keeping the very
same behavior.
  • Loading branch information
borisyankov committed May 29, 2019
1 parent 1c9608b commit 05505a5
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions src/main/StreamTabs.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* @flow strict-local */
import React from 'react';
import { StyleSheet, Text } from 'react-native';
import { TabNavigator, TabBarTop } from 'react-navigation';
import { createMaterialTopTabNavigator } from 'react-navigation';
import { FormattedMessage } from 'react-intl';

import type { TabNavigationOptionsPropsType } from '../types';
Expand All @@ -16,7 +16,7 @@ const styles = StyleSheet.create({
},
});

export default TabNavigator(
export default createMaterialTopTabNavigator(
{
subscribed: {
screen: SubscriptionsCard,
Expand All @@ -39,12 +39,8 @@ export default TabNavigator(
},
},
},
{
tabBarComponent: TabBarTop,
tabBarPosition: 'top',
...tabsOptions({
showLabel: true,
showIcon: false,
}),
},
tabsOptions({
showLabel: true,
showIcon: false,
}),
);

0 comments on commit 05505a5

Please sign in to comment.