Refactoring, adding some login logic stuff
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
<div id="profile-popover">
|
||||
<div *ngIf="isLoggedIn">
|
||||
<h2 class="heading">Hello, Paddy!</h2>
|
||||
<div *ngIf="this.user">
|
||||
<h2 class="heading">Hello, {{this.user!.firstName}}!</h2>
|
||||
<p>You're successfully logged in.</p>
|
||||
<p>Your id is: 1</p>
|
||||
<p>Your id is: {{this.user!.firebonkId}}</p>
|
||||
</div>
|
||||
<div *ngIf="!isLoggedIn">
|
||||
<div *ngIf="!this.user">
|
||||
<h2 class="heading">Not logged in</h2>
|
||||
<p>Please log in to continue</p>
|
||||
</div>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import {Component, ElementRef, EventEmitter, HostListener, OnInit, Output} from '@angular/core';
|
||||
import {Component, ElementRef, EventEmitter, HostListener, Input, OnInit, Output} from '@angular/core';
|
||||
import {User} from '../../models/user';
|
||||
|
||||
@Component({
|
||||
selector: 'app-profile',
|
||||
@@ -8,6 +9,7 @@ import {Component, ElementRef, EventEmitter, HostListener, OnInit, Output} from
|
||||
export class ProfileComponent implements OnInit {
|
||||
|
||||
initialClick = true;
|
||||
@Input() user?: User;
|
||||
@Output() showProfilePopoverChange = new EventEmitter<boolean>();
|
||||
|
||||
isLoggedIn = true;
|
||||
|
||||
Reference in New Issue
Block a user