Skip to content

Commit

Permalink
Fix the features not working on page (#142)
Browse files Browse the repository at this point in the history
Signed-off-by: Harshil-Jani <[email protected]>
  • Loading branch information
Harshil-Jani authored Oct 17, 2024
1 parent 49fd3ae commit 2f4e567
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/app/shared/profile-widget/profile-widget.html
Original file line number Diff line number Diff line change
@@ -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>
9 changes: 7 additions & 2 deletions src/app/shared/profile-widget/profile-widget.ts
Original file line number Diff line number Diff line change
@@ -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',
Expand All @@ -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)
}
}
}

0 comments on commit 2f4e567

Please sign in to comment.