diff options
author | sowgro <tpoke.ferrari@gmail.com> | 2025-03-15 17:28:01 -0400 |
---|---|---|
committer | sowgro <tpoke.ferrari@gmail.com> | 2025-03-15 17:28:01 -0400 |
commit | 51f0322db803ed3baf1f24f18a6e7a83dab58a3b (patch) | |
tree | f252383812cf1131199fa147feb0eca7639b520a /ufund-ui/src/app/app.component.ts | |
parent | 4f2f1d0944b15ced834255cd2934516a953b97a5 (diff) | |
download | JellySolutions-51f0322db803ed3baf1f24f18a6e7a83dab58a3b.tar.gz JellySolutions-51f0322db803ed3baf1f24f18a6e7a83dab58a3b.tar.bz2 JellySolutions-51f0322db803ed3baf1f24f18a6e7a83dab58a3b.zip |
Add login redirection
Diffstat (limited to 'ufund-ui/src/app/app.component.ts')
-rw-r--r-- | ufund-ui/src/app/app.component.ts | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/ufund-ui/src/app/app.component.ts b/ufund-ui/src/app/app.component.ts index a85d04b..6f4e1f5 100644 --- a/ufund-ui/src/app/app.component.ts +++ b/ufund-ui/src/app/app.component.ts @@ -1,7 +1,6 @@ import {Component, OnInit} from '@angular/core'; import {UsersService} from './services/users.service'; -import {BehaviorSubject, Observable, Subject} from 'rxjs'; -import {User} from './models/User'; +import {BehaviorSubject} from 'rxjs'; @Component({ selector: 'app-root', @@ -18,8 +17,11 @@ export class AppComponent implements OnInit { ) {} ngOnInit() { - this.userService.getCurrentUser().subscribe(r => { - this.currentUser$?.next("Logged in as " + r.username) + this.userService.getCurrentUserSubject().subscribe(r => { + this.currentUser$?.next(r + ? "Logged in as " + r.username + : "Logged out." + ) }) } |