aboutsummaryrefslogtreecommitdiff
path: root/ufund-ui/src/app/app.component.ts
diff options
context:
space:
mode:
authorGunther6070 <haydenhartman10@yahoo.com>2025-03-17 23:12:49 -0400
committerGunther6070 <haydenhartman10@yahoo.com>2025-03-17 23:12:49 -0400
commit5b6c20479fbb6ed0cabbbc88b42280c5a7dbd22c (patch)
tree16f93b3ce3b40de1e550f3824f60ca3aac632265 /ufund-ui/src/app/app.component.ts
parent7a5c5073e9e410b3ccc3ab7902a0d6f558277c7d (diff)
parent2b847078b7af4ade35461b8af52352bc88994be3 (diff)
downloadJellySolutions-5b6c20479fbb6ed0cabbbc88b42280c5a7dbd22c.tar.gz
JellySolutions-5b6c20479fbb6ed0cabbbc88b42280c5a7dbd22c.tar.bz2
JellySolutions-5b6c20479fbb6ed0cabbbc88b42280c5a7dbd22c.zip
Merge branch 'main' into funding_basket
Diffstat (limited to 'ufund-ui/src/app/app.component.ts')
-rw-r--r--ufund-ui/src/app/app.component.ts23
1 files changed, 20 insertions, 3 deletions
diff --git a/ufund-ui/src/app/app.component.ts b/ufund-ui/src/app/app.component.ts
index 2dbf33c..6f4e1f5 100644
--- a/ufund-ui/src/app/app.component.ts
+++ b/ufund-ui/src/app/app.component.ts
@@ -1,4 +1,6 @@
-import { Component } from '@angular/core';
+import {Component, OnInit} from '@angular/core';
+import {UsersService} from './services/users.service';
+import {BehaviorSubject} from 'rxjs';
@Component({
selector: 'app-root',
@@ -6,6 +8,21 @@ import { Component } from '@angular/core';
standalone: false,
styleUrl: './app.component.css'
})
-export class AppComponent {
- title = 'ufund-ui';
+export class AppComponent implements OnInit {
+ // title = 'ufund-ui';
+ currentUser$: BehaviorSubject<string> = new BehaviorSubject<string>("Logged out.");
+
+ constructor(
+ private userService: UsersService
+ ) {}
+
+ ngOnInit() {
+ this.userService.getCurrentUserSubject().subscribe(r => {
+ this.currentUser$?.next(r
+ ? "Logged in as " + r.username
+ : "Logged out."
+ )
+ })
+ }
+
}