Removed all todos from code and created corresponding JIRA tickets.

This commit is contained in:
Patrick Fic
2021-01-05 14:39:27 -08:00
parent 3e3b2780e3
commit af8ccfaff5
35 changed files with 65 additions and 143 deletions

View File

@@ -2,13 +2,11 @@ import { LockOutlined, UserOutlined } from "@ant-design/icons";
import { Button, Form, Input, Typography } from "antd";
import queryString from "query-string";
import React from "react";
import { useApolloClient } from "react-apollo";
import { useTranslation } from "react-i18next";
import { connect } from "react-redux";
import { Link, Redirect, useLocation } from "react-router-dom";
import { createStructuredSelector } from "reselect";
import ImEXOnlineLogo from "../../assets/logo192.png";
import { UPSERT_USER } from "../../graphql/user.queries";
import {
emailSignInStart,
sendPasswordReset,
@@ -38,7 +36,7 @@ export function SignInComponent({
sendPasswordReset,
}) {
const { redirect } = queryString.parse(useLocation().search);
const apolloClient = useApolloClient();
const { t } = useTranslation();
const handleFinish = (values) => {
const { email, password } = values;
@@ -46,22 +44,6 @@ export function SignInComponent({
};
const [form] = Form.useForm();
//TODO - may be able to run this only on new user creation.
if (currentUser.authorized === true) {
apolloClient
.mutate({
mutation: UPSERT_USER,
variables: {
authEmail: currentUser.email,
authToken: currentUser.uid,
},
})
.then()
.catch((error) => {
console.log("User login upsert error.", error);
});
}
if (currentUser.authorized === true)
return <Redirect to={redirect || "/manage"} />;