Skip to content

Commit

Permalink
Se agregan credenciales dummy
Browse files Browse the repository at this point in the history
  • Loading branch information
DannitaZz committed Mar 7, 2022
1 parent 075f600 commit 7d5d39b
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions src/pages/login.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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 (
<Container className="fade-in" component="main" maxWidth="xs">

<Box
sx={{
marginTop: 8,
Expand Down Expand Up @@ -93,9 +93,14 @@ export default function SignIn({state, dispatch}) {
>
Sign In
</Button>
<Typography component="div" variant="p">
Credentials:
<li>Username: ash_ketchum</li>
<li>Password: pikachu123</li>
</Typography>
</Box>
</Box>
<Copyright sx={{ mt: 8, mb: 4 }} />
</Container>
);
);
}

0 comments on commit 7d5d39b

Please sign in to comment.