@using LibMatrix.Responses @using ArcaneLibs
@User?.DisplayName
@if (ChildContent is not null) { @ChildContent }
@code { [Parameter] public RenderFragment? ChildContent { get; set; } [Parameter] public UserProfileResponse? User { get; set; } [Parameter] public string UserId { get; set; } private AuthenticatedHomeserverGeneric _homeserver = null!; private SvgIdenticonGenerator _identiconGenerator = new(); protected override async Task OnInitializedAsync() { _homeserver = await RMUStorage.GetCurrentSessionOrNavigate(); if (_homeserver is null) return; if (User == null) { if (UserId == null) { throw new ArgumentNullException(nameof(UserId)); } User = await _homeserver.GetProfileAsync(UserId); } await base.OnInitializedAsync(); } }