diff --git a/src/app/shared/profile-widget/profile-widget.html b/src/app/shared/profile-widget/profile-widget.html index 4c12e87d..fc7a29ec 100644 --- a/src/app/shared/profile-widget/profile-widget.html +++ b/src/app/shared/profile-widget/profile-widget.html @@ -1,4 +1,4 @@
diff --git a/src/app/shared/profile-widget/profile-widget.ts b/src/app/shared/profile-widget/profile-widget.ts index 5d5bcb85..20693139 100644 --- a/src/app/shared/profile-widget/profile-widget.ts +++ b/src/app/shared/profile-widget/profile-widget.ts @@ -1,7 +1,7 @@ import { Component, Input } from '@angular/core'; import { ProfileService } from 'src/app/services/profile'; import { Utilities } from 'src/app/services/utilities'; -import { NostrProfile } from '../../services/interfaces'; +import { NostrProfile, NostrProfileDocument } from '../../services/interfaces'; @Component({ selector: 'app-profile-widget', @@ -13,8 +13,13 @@ export class ProfileWidgetComponent { profileName = ''; tooltip = ''; + profile!: NostrProfileDocument; constructor(private profiles: ProfileService, private utilities: Utilities) {} - ngOnInit() {} + async ngOnInit() { + if(this.pubkey){ + this.profile = await this.profiles.getProfile(this.pubkey) + } + } }