From 4fe5857383294b3d5871f7df258d010d92ac40fc Mon Sep 17 00:00:00 2001 From: Rene Vergara Date: Thu, 14 Jul 2022 13:12:26 -0500 Subject: [PATCH] Fix redirect on order list page --- src/app/login/login.component.ts | 1 + src/app/viewer/viewer.component.ts | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/app/login/login.component.ts b/src/app/login/login.component.ts index 69f0b1c..f86e692 100644 --- a/src/app/login/login.component.ts +++ b/src/app/login/login.component.ts @@ -167,6 +167,7 @@ export class LoginComponent implements OnInit, AfterViewInit { } //console.log('Log in found in blockchain!'); if (user.validated) { + clearInterval(this.intervalHolder); if (this.owner.paid) { this.router.navigate(['/shop']); } else { diff --git a/src/app/viewer/viewer.component.ts b/src/app/viewer/viewer.component.ts index 9d1ac6b..5056177 100644 --- a/src/app/viewer/viewer.component.ts +++ b/src/app/viewer/viewer.component.ts @@ -80,9 +80,9 @@ export class ViewerComponent implements OnInit { this.message = owner.name; }); this.loginCheck(); - this.intervalHolder = setInterval(() => { - this.loginCheck(); - }, 60000); + //this.intervalHolder = setInterval(() => { + //this.loginCheck(); + //}, 60000); } ngOnDestroy(){ @@ -124,7 +124,7 @@ export class ViewerComponent implements OnInit { this.owner = owner; this.userUpdate.subscribe((user) => { this.user = user; - //console.log('Viewer loginCheck', this.user); + console.log('Viewer loginCheck', this.user); if (!this.owner.paid || !this.user.validated) { console.log('Log in expired!'); this.router.navigate(['/login']);