Rewrote app to use hooks and fixed multiple re-renders.
This commit is contained in:
@@ -2,7 +2,6 @@ import React from "react";
|
||||
import { auth } from "../../firebase/firebase.utils";
|
||||
import { Form, Icon, Input, Button, Alert } from "antd";
|
||||
|
||||
import { UPSERT_USER } from "../../graphql/user.queries";
|
||||
class SignInForm extends React.Component {
|
||||
constructor() {
|
||||
super();
|
||||
@@ -24,16 +23,6 @@ class SignInForm extends React.Component {
|
||||
password
|
||||
);
|
||||
|
||||
apolloClient
|
||||
.mutate({
|
||||
mutation: UPSERT_USER,
|
||||
variables: { authEmail: user.email, authToken: user.uid }
|
||||
})
|
||||
.then(r => console.log("Successful Upsert", r))
|
||||
.catch(error => {
|
||||
console.log("Upsert error!!!!", error);
|
||||
});
|
||||
|
||||
this.props.form.resetFields();
|
||||
} catch (error) {
|
||||
this.setState({ ...this.state, errorMessage: error.message });
|
||||
|
||||
Reference in New Issue
Block a user