Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/UnirTodo' into UnirTodo
Browse files Browse the repository at this point in the history
  • Loading branch information
UO271728 committed May 4, 2022
2 parents 17a7f70 + 718a73b commit 10474dc
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 7 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# dede_es2a

[![Actions Status](https://github.com/arquisoft/dede_0/workflows/CI%20for%20ASW2122/badge.svg)](https://github.com/arquisoft/dede_0/actions)
[![Actions Status](https://github.com/arquisoft/dede_0/workflows/CI%20for%20ASW2122/badge.svg)](https://github.com/arquisoft/dede_es2a/actions)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=Arquisoft_dede_es2a&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=Arquisoft_dede_es2a)
[![codecov](https://codecov.io/gh/Arquisoft/dede_es2a/branch/master/graph/badge.svg?token=QeHZrwyDn4)](https://codecov.io/gh/Arquisoft/dede_es2a)

Expand Down Expand Up @@ -42,7 +42,7 @@ npm install
npm start
```

You should be able to access the application in [http://localhost:3000](http://localhost:3000).
You should be able to access the application in [https://dede-es2a-webapp.herokuapp.com/](https://dede-es2a-webapp.herokuapp.com/).

## More information
You can get more information about the respository in the other README files:
Expand Down
8 changes: 4 additions & 4 deletions README_es.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# asw2122_0

[![Actions Status](https://github.com/pglez82/asw2122_0/workflows/CI%20for%20ASW2122/badge.svg)](https://github.com/pglez82/asw2122_0/actions)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=pglez82_asw2122_0&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=pglez82_asw2122_0)
[![codecov](https://codecov.io/gh/pglez82/asw2122_0/branch/master/graph/badge.svg?token=VN4XG9NTRO)](https://codecov.io/gh/pglez82/asw2122_0)
[![Actions Status](https://github.com/arquisoft/dede_0/workflows/CI%20for%20ASW2122/badge.svg)](https://github.com/arquisoft/dede_es2a/actions)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=Arquisoft_dede_es2a&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=Arquisoft_dede_es2a)
[![codecov](https://codecov.io/gh/Arquisoft/dede_es2a/branch/master/graph/badge.svg?token=QeHZrwyDn4)](https://codecov.io/gh/Arquisoft/dede_es2a)

<p float="left">
<img src="https://blog.wildix.com/wp-content/uploads/2020/06/react-logo.jpg" height="100">
Expand Down Expand Up @@ -43,7 +43,7 @@ npm install
npm start
```

Deberias ser capaz de acceder a la aplicación en [http://localhost:3000](http://localhost:3000).
Deberias ser capaz de acceder a la aplicación en [https://dede-es2a-webapp.herokuapp.com](https://dede-es2a-webapp.herokuapp.com).

## Mas información
Encontrarás más información sobre el repositorio en los otros archivos README:
Expand Down
13 changes: 12 additions & 1 deletion webapp/src/componentes/Login/LoginButtonCart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,18 @@ import { useAuth0 } from '@auth0/auth0-react';

const LoginButtonCart = () => {
const { loginWithRedirect } = useAuth0();
return <button className='btn btn-danger btn-lg' onClick={() => loginWithRedirect()}>Regístrese para seguir la compra</button>;
return <button className='btn btn-danger btn-lg' onClick={() => {
loginWithRedirect()

const localUser = localStorage.getItem("user");
if (localUser) {
localStorage.setItem("sesion","true")
JSON.parse(localUser);
} else {
localStorage.setItem("sesion","false")
localStorage.setItem("user", JSON.stringify([]));
}
localStorage.setItem("reload","true") }}>Regístrese para seguir la compra</button>;
}

export default LoginButtonCart;

0 comments on commit 10474dc

Please sign in to comment.