Skip to content

Commit

Permalink
Prueba para arreglo sesion en deploy
Browse files Browse the repository at this point in the history
Co-Authored-By: uo282936 <[email protected]>
  • Loading branch information
JorgeCasatejada and uo282936 committed May 1, 2023
1 parent 1b93ee1 commit 7e92b46
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions webapp/src/helper/HomeHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import Swal from "sweetalert2";
import { getFriendsFromPod, getFriendsNamesFromPod } from "../solid/podsFriends";

export function showLoadingDialogHelper(session:Session,navigate:any,loadFriends:any){
console.log("session");
console.log(session);
let loadingTimer: NodeJS.Timeout;
let sessionTimer: NodeJS.Timeout;

Expand All @@ -16,12 +18,16 @@ export function showLoadingDialogHelper(session:Session,navigate:any,loadFriends
didOpen: () => {
// Comprobar cada segundo si el objeto session tiene valor
sessionTimer = setInterval(() => {
console.log(session);
console.log(session.info.isLoggedIn);
if (session.info.isLoggedIn) {
console.log("Entro en logged in");
// Si el objeto session tiene valor, detener los temporizadores
clearInterval(loadingTimer);
clearInterval(sessionTimer);

loadFriends().then(() => {
console.log("Entro en load friends");
setTimeout(() => {
// Mostrar el diálogo de carga completa y ejecutar la función loadFriends
Swal.close()
Expand Down

0 comments on commit 7e92b46

Please sign in to comment.