@using Iceshrimp.Frontend.Core.Services @using Iceshrimp.Frontend.Localization @using Iceshrimp.Shared.Schemas.Web @using Microsoft.Extensions.Localization @inject ApiService Api; @inject NavigationManager NavigationManager; @inject IStringLocalizer Loc; @if (UserProfile != null) {
avatar for @User.DisplayName
@@@User.Username @if (User.Host != null) { var host = $"@{User.Host}"; @host }
@if (ShowBio) { @if (UserProfile.Bio != null) {
} }
} @code { [Parameter] [EditorRequired] public required UserResponse User { get; set; } private UserProfileResponse? UserProfile { get; set; } [Parameter] public bool ShowBio { get; set; } = true; protected override async Task OnInitializedAsync() { UserProfile = await Api.Users.GetUserProfile(User.Id); } private void Open() { var username = $"@{User.Username}"; if (User.Host != null) username += $"@{User.Host}"; NavigationManager.NavigateTo($"/{username}"); } }