Added ProfilePictureComponent
This commit is contained in:
parent
c96b6c5ba2
commit
08daca8dd3
|
@ -57,12 +57,7 @@
|
|||
</ul>
|
||||
<AuthorizeView>
|
||||
@if (context.User.FindFirst(ClaimTypes.NameIdentifier)?.Value is { } id) {
|
||||
<div class="avatar">
|
||||
<div class="w-8 rounded">
|
||||
<img src="/api/user/pfp/@id" alt="" loading="lazy"
|
||||
onerror="this.remove()" />
|
||||
</div>
|
||||
</div>
|
||||
<ProfilePictureComponent ProfileId="@id" />
|
||||
}
|
||||
</AuthorizeView>
|
||||
</div>
|
||||
|
|
11
Wave/Components/ProfilePictureComponent.razor
Normal file
11
Wave/Components/ProfilePictureComponent.razor
Normal file
|
@ -0,0 +1,11 @@
|
|||
<div class="avatar">
|
||||
<div class="w-8 rounded">
|
||||
<img src="/api/user/pfp/@ProfileId" alt="" loading="lazy"
|
||||
onerror="this.remove()" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@code {
|
||||
[Parameter]
|
||||
public string ProfileId { get; set; } = string.Empty;
|
||||
}
|
Loading…
Reference in a new issue