From 30e9694421564f57b0d5faa35dc356a739aeb11a Mon Sep 17 00:00:00 2001 From: Alberto Defendi <1369-ahl-berto@users.noreply.gitlab.inf.unibz.it> Date: Tue, 23 Mar 2021 15:49:41 +0100 Subject: [PATCH] Replace LoginForm with AuthUser --- src/App.tsx | 4 ++-- src/components/AuthUser/LoginForm/LoginForm.tsx | 7 +------ 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index bd84407..7e1b7e7 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,10 +1,10 @@ import React from 'react'; -import { LoginForm } from './components/AuthUser/LoginForm/LoginForm'; +import { AuthUser } from './components/AuthUser/AuthUser'; export const App: React.FC = () => ( <div className="App" data-testid="App"> <header className="App-header"> - <LoginForm /> + <AuthUser /> </header> </div> ); diff --git a/src/components/AuthUser/LoginForm/LoginForm.tsx b/src/components/AuthUser/LoginForm/LoginForm.tsx index eac45d9..67f6e47 100644 --- a/src/components/AuthUser/LoginForm/LoginForm.tsx +++ b/src/components/AuthUser/LoginForm/LoginForm.tsx @@ -38,12 +38,7 @@ export const LoginForm: React.FC = () => { const handleSubmit = (event: React.FormEvent): void => { event.preventDefault(); const errors: Array<string> = []; - if (!isEmailValid(formValues.email)) { - errors.push('email'); - console.log('Email address not valid'); - } else { - console.log(formValues); - } + if (!isEmailValid(formValues.email)) errors.push('email'); }; const classes = useStyles(); -- GitLab