Fix redirect on order list page
This commit is contained in:
parent
2535e23db6
commit
4fe5857383
2 changed files with 5 additions and 4 deletions
|
@ -167,6 +167,7 @@ export class LoginComponent implements OnInit, AfterViewInit {
|
||||||
}
|
}
|
||||||
//console.log('Log in found in blockchain!');
|
//console.log('Log in found in blockchain!');
|
||||||
if (user.validated) {
|
if (user.validated) {
|
||||||
|
clearInterval(this.intervalHolder);
|
||||||
if (this.owner.paid) {
|
if (this.owner.paid) {
|
||||||
this.router.navigate(['/shop']);
|
this.router.navigate(['/shop']);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -80,9 +80,9 @@ export class ViewerComponent implements OnInit {
|
||||||
this.message = owner.name;
|
this.message = owner.name;
|
||||||
});
|
});
|
||||||
this.loginCheck();
|
this.loginCheck();
|
||||||
this.intervalHolder = setInterval(() => {
|
//this.intervalHolder = setInterval(() => {
|
||||||
this.loginCheck();
|
//this.loginCheck();
|
||||||
}, 60000);
|
//}, 60000);
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnDestroy(){
|
ngOnDestroy(){
|
||||||
|
@ -124,7 +124,7 @@ export class ViewerComponent implements OnInit {
|
||||||
this.owner = owner;
|
this.owner = owner;
|
||||||
this.userUpdate.subscribe((user) => {
|
this.userUpdate.subscribe((user) => {
|
||||||
this.user = user;
|
this.user = user;
|
||||||
//console.log('Viewer loginCheck', this.user);
|
console.log('Viewer loginCheck', this.user);
|
||||||
if (!this.owner.paid || !this.user.validated) {
|
if (!this.owner.paid || !this.user.validated) {
|
||||||
console.log('Log in expired!');
|
console.log('Log in expired!');
|
||||||
this.router.navigate(['/login']);
|
this.router.navigate(['/login']);
|
||||||
|
|
Loading…
Reference in a new issue