Fix order list redirection
This commit is contained in:
parent
946828563c
commit
1e14ab0c5a
3 changed files with 4 additions and 7 deletions
|
@ -8,10 +8,6 @@ import { Component } from '@angular/core';
|
|||
})
|
||||
|
||||
export class AppComponent {
|
||||
//StoredPosts: Post[] = [];
|
||||
title = 'sell4zec';
|
||||
title = 'ZGo';
|
||||
|
||||
//onPostAdded(post: Post){
|
||||
//this.StoredPosts.push(post);
|
||||
//}
|
||||
}
|
||||
|
|
|
@ -206,6 +206,7 @@ export class BusinessComponent implements OnInit {
|
|||
this.userService.findUser();
|
||||
this.ownerUpdate.subscribe((owner) => {
|
||||
if(owner.paid) {
|
||||
clearInterval(this.intervalHolder);
|
||||
this.router.navigate(['/shop']);
|
||||
}
|
||||
});
|
||||
|
|
|
@ -18,7 +18,7 @@ import {User} from '../user.model';
|
|||
})
|
||||
|
||||
export class ViewerComponent implements OnInit {
|
||||
intervalHolder: any;
|
||||
//intervalHolder: any;
|
||||
public message: string = "Welcome to the inside!";
|
||||
public user: User = {
|
||||
address: '',
|
||||
|
@ -131,7 +131,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']);
|
||||
|
|
Loading…
Reference in a new issue