Skip to content

Instantly share code, notes, and snippets.

@anthonywebb
Created May 4, 2016 15:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anthonywebb/eb32f7229c860cc386080b243d1a02f5 to your computer and use it in GitHub Desktop.
Save anthonywebb/eb32f7229c860cc386080b243d1a02f5 to your computer and use it in GitHub Desktop.
'use strict';
import {Container, Header, Content, List, ListItem, Text, Title, Button, Icon} from 'native-base';
import React, {Component} from 'react-native';
import CookieManager from 'react-native-cookies';
import Auth from './Auth'
export default class Clients extends Component {
constructor(props) {
super(props);
this.state = {
loggedIn: true
};
}
logout () {
CookieManager.clearAll((err, res) => {
console.log(err);
console.log(res);
});
this.setState({
loggedIn: false,
});
}
render () {
if (this.state.loggedIn) {
console.log('rendering list');
return (
<Container>
<Header>
<Button transparent>
<Icon name={'ios-arrow-left'} />
</Button>
<Title>Header</Title>
<Button transparent>
<Icon name={'navicon'}/>
</Button>
</Header>
<Content>
<List>
<ListItem >
<Text>Simon Mignolet</Text>
</ListItem>
<ListItem>
<Text>Nathaniel Clyne</Text>
</ListItem>
<ListItem>
<Text>Dejan Lovren</Text>
</ListItem>
</List>
</Content>
</Container>
);
}
else {
return (
<Auth/>
);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment