There was an error while loading. Please reload this page.
1 parent a749de4 commit 7979119Copy full SHA for 7979119
1 file changed
projects/miles/src/app/miles-overview.ts
@@ -1,4 +1,5 @@
1
import { Component, inject } from '@angular/core';
2
+import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
3
import { UserPanel } from '@flights42/ui-common';
4
import { AuthService } from '@flights42/util-auth';
5
@@ -38,9 +39,11 @@ export class MilesOverview {
38
39
private readonly authService = inject(AuthService);
40
41
constructor() {
- this.authService.userName.subscribe((userName) => {
42
- console.log('userName', userName ? userName : 'unknown');
43
- });
+ this.authService.userName
+ .pipe(takeUntilDestroyed())
44
+ .subscribe((userName) => {
45
+ console.log('userName', userName ? userName : 'unknown');
46
+ });
47
}
48
49
0 commit comments