Fix the features not working on page

Signed-off-by: Harshil-Jani <harshiljani2002@gmail.com>
This commit is contained in:
Harshil-Jani 2024-04-11 16:49:34 +05:30
parent 5d91211754
commit 44416a7491
2 changed files with 8 additions and 3 deletions

View File

@ -1,4 +1,4 @@
<div class="profile-widget">
<app-event-header [pubkey]="pubkey"></app-event-header>
<app-profile-actions [pubkey]="pubkey"></app-profile-actions>
<app-profile-actions [pubkey]="pubkey" [profile]="profile"></app-profile-actions>
</div>

View File

@ -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)
}
}
}