Guest User

Untitled

a guest
Jan 17th, 2019
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. import _ from 'lodash'
  2.  
  3. ...
  4. TAB_WALLET: {
  5. screen: createStackNavigator({
  6. Wallet: {
  7. ...
  8. }
  9. }),
  10. // Start here
  11. navigationOptions: ({ navigation }) => {
  12. const walletScreen = navigation.state.routes.find(
  13. obj => obj.routeName === 'Wallet'
  14. )
  15.  
  16. const isTabBarVisible = !_.get(
  17. walletScreen,
  18. 'params.isWalletDropdownVisible'
  19. )
  20.  
  21. return {
  22. tabBarVisible: isTabBarVisible,
  23. tabBarLabel: 'Wallet',
  24. tabBarIcon: ({ focused }) => (
  25. <Icon name='ios-wallet' focused={focused} />
  26. )
  27. }
  28. }
  29. // End here
  30. }
  31. ...
Add Comment
Please, Sign In to add comment