This file contains hidden or 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
// Request a new password | |
async forgotPassword() { | |
const { username } = this.state | |
await Auth.forgotPassword(username) | |
.then(data => console.log('New code sent', data)) | |
.catch(err => { | |
if (! err.message) { | |
console.log('Error while setting up the new password: ', err) | |
Alert.alert('Error while setting up the new password: ', err) | |
} else { |
This file contains hidden or 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
// Sign up user with AWS Amplify Auth | |
async signUp() { | |
const { username, password, email, phoneNumber } = this.state | |
// rename variable to conform with Amplify Auth field phone attribute | |
const phone_number = phoneNumber | |
await Auth.signUp({ | |
username, | |
password, | |
attributes: { email, phone_number } | |
}) |
This file contains hidden or 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
export default class SettingsScreen extends React.Component { | |
// ... same code above this line | |
render() { | |
return ( | |
<SafeAreaView style={styles.container}> | |
<StatusBar/> | |
<KeyboardAvoidingView style={styles.container} behavior='padding' enabled> | |
<TouchableWithoutFeedback style={styles.container} onPress={Keyboard.dismiss}> | |
<View style={styles.container}> | |
{/*Infos*/} |
This file contains hidden or 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
export default class ForgetPasswordScreen extends React.Component { | |
// ...same code above | |
render() { | |
return ( | |
<SafeAreaView style={styles.container}> | |
<StatusBar/> | |
<KeyboardAvoidingView | |
style={styles.container} | |
behavior='padding' | |
enabled |
This file contains hidden or 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
export default class SignUpScreen extends React.Component { | |
// ... same code above this line | |
render() { | |
return ( | |
<SafeAreaView style={styles.container}> | |
<StatusBar/> | |
<KeyboardAvoidingView | |
style={styles.container} | |
behavior='padding' | |
enabled> |
This file contains hidden or 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
const styles = StyleSheet.create({ | |
container: { | |
flex: 1, | |
backgroundColor: '#aa73b7', | |
justifyContent: 'center', | |
flexDirection: 'column' | |
}, | |
input: { | |
flex: 1, | |
fontSize: 17, |
This file contains hidden or 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
export default class SignInScreen extends React.Component { | |
//... same code as before in the above | |
render() { | |
return ( | |
<SafeAreaView style={styles.container}> | |
<StatusBar/> | |
<KeyboardAvoidingView style={styles.container} behavior='padding' enabled> | |
<TouchableWithoutFeedback style={styles.container} onPress={Keyboard.dismiss}> | |
<View style={styles.container}> | |
<Container style={styles.infoContainer}> |
This file contains hidden or 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
const styles = StyleSheet.create({ | |
container: { | |
flex: 1, | |
backgroundColor: '#aa73b7', | |
justifyContent: 'center', | |
flexDirection: 'column' | |
}, | |
input: { | |
flex: 1, | |
fontSize: 17, |
This file contains hidden or 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
import React from 'react'; | |
import { StyleSheet, Text, View, TouchableOpacity } from 'react-native' | |
import { | |
createSwitchNavigator, | |
createStackNavigator , | |
createDrawerNavigator, | |
createBottomTabNavigator | |
} from 'react-navigation' |
NewerOlder