refactor: remove unused getLabel method

This commit is contained in:
Satyajit Sahoo
2018-06-18 11:04:27 +02:00
parent b4d0c80483
commit 3027fd191d
2 changed files with 0 additions and 28 deletions

View File

@@ -39,16 +39,6 @@ class TabNavigationView extends React.PureComponent<Props, State> {
loaded: [this.props.navigation.state.index],
};
_getLabel = ({ route, focused, tintColor }) => {
const label = this.props.getLabelText({ route });
if (typeof label === 'function') {
return label({ focused, tintColor });
}
return label;
};
_renderTabBar = () => {
const {
tabBarComponent: TabBarComponent = BottomTabBar,

View File

@@ -27,24 +27,6 @@ class MaterialTabView extends React.PureComponent<Props> {
}),
};
_getLabel = ({ route, tintColor, focused }) => {
const { descriptors } = this.props;
const descriptor = descriptors[route.key];
const options = descriptor.options;
if (options.tabBarLabel) {
return typeof options.tabBarLabel === 'function'
? options.tabBarLabel({ tintColor, focused })
: options.tabBarLabel;
}
if (typeof options.title === 'string') {
return options.title;
}
return route.routeName;
};
_renderIcon = ({ focused, route, tintColor }) => {
const { descriptors } = this.props;
const descriptor = descriptors[route.key];