Guest User

Untitled

a guest
Mar 24th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. const AppDrawerNavigator = DrawerNavigator(Navigator, {
  2. contentComponent: props => <SideBar {...props} />
  3. });
  4.  
  5. var routes = [route.HOME, route.NEWS, route.TICKET, route.CONTACT];
  6.  
  7. AsyncStorage.getItem(storage.USER).then((data) => {
  8. if (data !== null)
  9. routes.splice(0, 1);
  10. else
  11. routes.splice(2, 1);
  12. });
  13.  
  14. <List
  15. dataArray={routes}
  16. contentContainerStyle={{
  17. marginTop: 120
  18. }}
  19. renderRow={data => {
  20. return (
  21. <ListItem button onPress={() => this.props.navigation.navigate(data)}>
  22. <Text>{data}</Text>
  23. </ListItem>
  24. );
  25. }} />
Add Comment
Please, Sign In to add comment