Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const AppDrawerNavigator = DrawerNavigator(Navigator, {
- contentComponent: props => <SideBar {...props} />
- });
- var routes = [route.HOME, route.NEWS, route.TICKET, route.CONTACT];
- AsyncStorage.getItem(storage.USER).then((data) => {
- if (data !== null)
- routes.splice(0, 1);
- else
- routes.splice(2, 1);
- });
- <List
- dataArray={routes}
- contentContainerStyle={{
- marginTop: 120
- }}
- renderRow={data => {
- return (
- <ListItem button onPress={() => this.props.navigation.navigate(data)}>
- <Text>{data}</Text>
- </ListItem>
- );
- }} />
Add Comment
Please, Sign In to add comment