Skip to content

Instantly share code, notes, and snippets.

@ammark47
Created January 28, 2016 16:10
Show Gist options
  • Save ammark47/66b71e96a3394387cdf5 to your computer and use it in GitHub Desktop.
Save ammark47/66b71e96a3394387cdf5 to your computer and use it in GitHub Desktop.
/**
* Sample React Native App
* https://github.com/facebook/react-native
*/
'use strict';
var Auth0Lock = require('react-native-lock-ios');
var lock = new Auth0Lock({clientId: 'redacted', domain: 'redacted'});
import React, {
Image,
AppRegistry,
Component,
StyleSheet,
TextInput,
Text,
View
} from 'react-native';
import AwesomeButton from 'react-native-awesome-button';
import styles from '../Styles/styles';
class LogIn extends Component {
constructor(props) {
super(props)
this.state = {
buttonState: 'idle'
}
this.handleLogIn = this.handleLogIn.bind(this);
}
handleLogIn() {
console.log('hello');
// lock.show({}, (err, profile, token) => {
// if (err) {
// console.log(err);
// return;
// }
// // Authentication worked!
// console.log('Logged in with Auth0!');
// });
}
render() {
return (
<View style={styles.container}>
<Image style={styles.bg} source={require('../Assets/homeFood.jpg')} />
<View style={styles.header}>
<Image style={styles.mark} source={{uri: 'http://i.imgur.com/da4G0Io.png'}} />
</View>
<View style={styles.buttonContainerLogIn}>
<AwesomeButton states={{
idle: {
text: 'Log In',
onPress: this.handleLogIn,
backgroundColor: '#1155DD'
}
}} />
</View>
<View style={styles.buttonContainerSignUp}>
<AwesomeButton states={{
default: {
text: 'Sign Up',
backgroundColor: '#ac0000',
onPress: this.handleSignUp
}
}} />
</View>
</View>
)
}
}
export default LogIn;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment