Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- onLogin = async () => {
- try {
- const response = await firebase.auth().signInWithEmailAndPassword(this.state.emailValue, this.state.passwordValue);
- console.log(response);
- this.setState({
- loggingIn: false,
- emailValue: '',
- passwordValue: '',
- hasError: false,
- error: '',
- });
- } catch (error) {
- console.log(error);
- this.setState({ loggingIn: false, error: error.toString(), hasError: true });
- }
- this.setState({
- loggingIn: false,
- });
- }
- onChangeLogin = (e, type) => {
- this.setState({ [`${type}Value`]: e });
- }
Add Comment
Please, Sign In to add comment