Skip to content

Commit

Permalink
Merge pull request #280 from Arquisoft/develop
Browse files Browse the repository at this point in the history
Cambios en funcionalidad tras la presentación
  • Loading branch information
UO271447 authored May 10, 2022
2 parents f989faa + 6804509 commit d2e87a5
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 6 deletions.
1 change: 0 additions & 1 deletion webapp/src/components/Login/LoginUsrPsswd.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ const LoginUsrPsswd = () => {
// Lo guardamos en sesion (solo el usuario, la contraseña no la necesitamos para nada)
sessionStorage.setItem('user', parsedUser.username);
// Redirigimos a inicio
//window.location.href='http://localhost:3000/';
window.location.href = window.location.protocol + '//' + window.location.host + '/'
}
}
Expand Down
5 changes: 2 additions & 3 deletions webapp/src/components/Login/Register.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ const Register = () => {
if(add){
const item = {"username":userName,"password":password};
// Almacenamos el usuario en sesión
sessionStorage.setItem('user',JSON.stringify(item));
alert("Usuario añadido");
sessionStorage.setItem('user', item.username);
alert('Usuario registrado.');
window.location.href = window.location.protocol + '//' + window.location.host + '/'
}
else{
Expand All @@ -65,7 +65,6 @@ const Register = () => {
else{
alert("Las contraseñas no coinciden");
}
window.location.reload();
}
return (
<>
Expand Down
2 changes: 1 addition & 1 deletion webapp/src/components/Requests/ListRequests.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const ListRequests = () => {
React.useEffect(()=>{
refreshPedidos();
},[]);

return (
<div>
<List sx={{ marginLeft:'35%',
Expand Down
1 change: 0 additions & 1 deletion webapp/src/shared/shareddtypes.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { ObjectId } from 'bson';
import { Double } from 'mongodb';

export type User = {
username:string;
Expand Down

0 comments on commit d2e87a5

Please sign in to comment.