|
|
@@ -1,5 +1,5 @@ |
|
|
|
import { Component, OnInit } from '@angular/core'; |
|
|
|
import { Router } from '@angular/router'; |
|
|
|
import { Location } from '@angular/common'; |
|
|
|
|
|
|
|
@Component({ |
|
|
|
selector: 'app-welcome', |
|
|
@@ -10,20 +10,20 @@ export class WelcomePage implements OnInit { |
|
|
|
user: any; |
|
|
|
|
|
|
|
constructor( |
|
|
|
private router: Router |
|
|
|
private location: Location |
|
|
|
) { } |
|
|
|
|
|
|
|
ngOnInit() { |
|
|
|
if (localStorage.getItem('FBUser')) { |
|
|
|
this.user = JSON.parse(localStorage.getItem('FBUser')); |
|
|
|
|
|
|
|
setTimeout(() => { |
|
|
|
this.router.navigate(['/tabs/home']); |
|
|
|
setTimeout(() => { |
|
|
|
this.location.back(); |
|
|
|
}, 3000); |
|
|
|
|
|
|
|
} else { |
|
|
|
this.user = null; |
|
|
|
this.router.navigate(['/tabs/home']); |
|
|
|
this.location.back(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|