Files
Module.EventRegistration/Client/Components/UserComponent.razor

23 lines
523 B
Plaintext

@inject FileService fileService
<div>
<img src=@profilePictureUrl />
<h4>@user.DisplayName</h4>
<p>@user.Settings["Jahrgang"] - @user.Settings["Fachrichtung"]</p>
</div>
@code {
[Parameter]
public User user { get; set; }
private string profilePictureUrl = "";
protected override async Task OnInitializedAsync()
{
if(user.PhotoFileId != null)
{
File f = await fileService.GetFileAsync(user.PhotoFileId);
profilePictureUrl = f.Url;
}
}
}