Skip to content

Commit 2f4e567

Browse files
authored
Fix the features not working on page (#142)
Signed-off-by: Harshil-Jani <[email protected]>
1 parent 49fd3ae commit 2f4e567

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<div class="profile-widget">
22
<app-event-header [pubkey]="pubkey"></app-event-header>
3-
<app-profile-actions [pubkey]="pubkey"></app-profile-actions>
3+
<app-profile-actions [pubkey]="pubkey" [profile]="profile"></app-profile-actions>
44
</div>

src/app/shared/profile-widget/profile-widget.ts

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Component, Input } from '@angular/core';
22
import { ProfileService } from 'src/app/services/profile';
33
import { Utilities } from 'src/app/services/utilities';
4-
import { NostrProfile } from '../../services/interfaces';
4+
import { NostrProfile, NostrProfileDocument } from '../../services/interfaces';
55

66
@Component({
77
selector: 'app-profile-widget',
@@ -13,8 +13,13 @@ export class ProfileWidgetComponent {
1313

1414
profileName = '';
1515
tooltip = '';
16+
profile!: NostrProfileDocument;
1617

1718
constructor(private profiles: ProfileService, private utilities: Utilities) {}
1819

19-
ngOnInit() {}
20+
async ngOnInit() {
21+
if(this.pubkey){
22+
this.profile = await this.profiles.getProfile(this.pubkey)
23+
}
24+
}
2025
}

0 commit comments

Comments
 (0)