diff options
author | Gunther6070 <haydenhartman10@yahoo.com> | 2025-03-15 23:19:56 -0400 |
---|---|---|
committer | Gunther6070 <haydenhartman10@yahoo.com> | 2025-03-15 23:19:56 -0400 |
commit | 47501b0d9765e64eba370ba80bbc7b2cd5940170 (patch) | |
tree | abeda89cd86423119d5a895aa4240de83a974da5 /ufund-ui/src/app/app.component.ts | |
parent | 28e46060c8bcf7fd2adc19793bd63e27df4e7356 (diff) | |
parent | d97d4d430113088c4f52f53c040d8705c66b410e (diff) | |
download | JellySolutions-47501b0d9765e64eba370ba80bbc7b2cd5940170.tar.gz JellySolutions-47501b0d9765e64eba370ba80bbc7b2cd5940170.tar.bz2 JellySolutions-47501b0d9765e64eba370ba80bbc7b2cd5940170.zip |
Merge branch 'api-auth' of https://github.com/RIT-SWEN-261-02/team-project-2245-swen-261-02-2b into api-auth
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." + ) }) } |