blob: 22f6a41f90c87f603510b55b9e5c088abaa95892 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
import { Component, OnInit } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { UserInfo } from '../entities';
import { InternalUserService } from '../internal-user-service/internal-user.service';
import { throwIfNullOrUndefined } from 'src/app/utilities/language-untilities';
@Component({
selector: 'app-user-login-success',
templateUrl: './user-login-success.component.html',
styleUrls: ['./user-login-success.component.css']
})
export class UserLoginSuccessComponent implements OnInit {
displayLoginSuccessMessage = false;
userInfo!: UserInfo;
constructor(private route: ActivatedRoute, private userService: InternalUserService) { }
ngOnInit() {
this.userInfo = throwIfNullOrUndefined(this.userService.currentUserInfo, () => 'Route error. No login now!');
this.displayLoginSuccessMessage = this.route.snapshot.paramMap.get('reason') === 'login';
}
}
|