Created
May 4, 2016 15:58
-
-
Save anthonywebb/eb32f7229c860cc386080b243d1a02f5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'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