diff --git a/client/src/app/core/layout/layout.component.html b/client/src/app/core/layout/layout.component.html index 285b7ba..5385042 100644 --- a/client/src/app/core/layout/layout.component.html +++ b/client/src/app/core/layout/layout.component.html @@ -34,11 +34,13 @@
-
+
- {{ date | date : "dd MMM yyyy" }} + {{ date | date : "dd MMM yyyy HH:mm:ss" }}

(); @@ -42,6 +43,21 @@ export class LayoutComponent implements OnInit { this._userService.currentUser .pipe(takeUntil(this.exit$)) .subscribe((user) => (this.user = user)); + + this.clockSubscription = timer(0, 1000) + .pipe( + map(() => new Date()), + share() + ) + .subscribe((time) => { + this.date = time; + }); + } + + ngOnDestroy() { + this.exit$.next(); + this.exit$.complete(); + this.clockSubscription?.unsubscribe(); } logout() {