File tree 2 files changed +8
-3
lines changed
src/app/shared/profile-widget
2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change 1
1
< div class ="profile-widget ">
2
2
< 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 >
4
4
</ div >
Original file line number Diff line number Diff line change 1
1
import { Component , Input } from '@angular/core' ;
2
2
import { ProfileService } from 'src/app/services/profile' ;
3
3
import { Utilities } from 'src/app/services/utilities' ;
4
- import { NostrProfile } from '../../services/interfaces' ;
4
+ import { NostrProfile , NostrProfileDocument } from '../../services/interfaces' ;
5
5
6
6
@Component ( {
7
7
selector : 'app-profile-widget' ,
@@ -13,8 +13,13 @@ export class ProfileWidgetComponent {
13
13
14
14
profileName = '' ;
15
15
tooltip = '' ;
16
+ profile ! : NostrProfileDocument ;
16
17
17
18
constructor ( private profiles : ProfileService , private utilities : Utilities ) { }
18
19
19
- ngOnInit ( ) { }
20
+ async ngOnInit ( ) {
21
+ if ( this . pubkey ) {
22
+ this . profile = await this . profiles . getProfile ( this . pubkey )
23
+ }
24
+ }
20
25
}
You can’t perform that action at this time.
0 commit comments