From 7d5d39bc1b4f73fd6af25143544d6eab91c40729 Mon Sep 17 00:00:00 2001 From: Danna Cardenas Date: Mon, 7 Mar 2022 17:29:11 -0500 Subject: [PATCH] Se agregan credenciales dummy --- src/pages/login.jsx | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/src/pages/login.jsx b/src/pages/login.jsx index c878e46..5193651 100644 --- a/src/pages/login.jsx +++ b/src/pages/login.jsx @@ -29,7 +29,7 @@ function Copyright(props) { ); } -export default function SignIn({state, dispatch}) { +export default function SignIn({ state, dispatch }) { const navigateTo = useNavigate(); const handleSubmit = (event) => { event.preventDefault(); @@ -42,16 +42,16 @@ export default function SignIn({state, dispatch}) { const currentUser = user.email const currentPass = user.password - if (((currentUser===realUser) && (currentPass===realPass))){ - dispatch({type:'login'}) + if (((currentUser === realUser) && (currentPass === realPass))) { + dispatch({ type: 'login' }) navigateTo('/') - } else{ - } + } else { + } }; return ( - + Sign In + + Credentials: +
  • Username: ash_ketchum
  • +
  • Password: pikachu123
  • +
    -); + ); }