Skip to content

Commit

Permalink
fix(UI): remove web warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
alexsland committed Nov 13, 2018
1 parent a8457bb commit 52fe7e7
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions client/react-native/common/components/Screens/index.js
Expand Up @@ -10,6 +10,18 @@ import { ByPublicKeyModal } from './Contacts/Add/ByPublicKey'
import { EventListFilterModal } from './Settings/Devtools/EventList'
import IconFeather from 'react-native-vector-icons/dist/Feather'

const TabBarIcon = (tintColor, routeName) => {
let iconName
if (routeName === 'contacts') {
iconName = 'users'
} else if (routeName === 'chats') {
iconName = 'message-circle'
} else if (routeName === 'settings') {
iconName = 'settings'
}
return <IconFeather name={iconName} size={24} color={tintColor} />
}

export const mainTabs = createTabNavigator(
{
contacts: Contacts,
Expand All @@ -22,18 +34,7 @@ export const mainTabs = createTabNavigator(
animationEnabled: true,
tabBarPosition: 'bottom',
navigationOptions: ({ navigation }) => ({
tabBarIcon: ({ focused, tintColor }) => {
const { routeName } = navigation.state
let iconName
if (routeName === 'contacts') {
iconName = 'users'
} else if (routeName === 'chats') {
iconName = 'message-circle'
} else if (routeName === 'settings') {
iconName = 'settings'
}
return <IconFeather name={iconName} size={24} color={tintColor} />
},
tabBarIcon: ({ tintColor }) => TabBarIcon(tintColor, navigation.state.routeName),
}),
tabBarOptions: {
showIcon: true,
Expand Down

0 comments on commit 52fe7e7

Please sign in to comment.