diff --git a/Iceshrimp.Frontend/Components/UserProfileCard.razor b/Iceshrimp.Frontend/Components/UserProfileCard.razor index 736c198c..94dea746 100644 --- a/Iceshrimp.Frontend/Components/UserProfileCard.razor +++ b/Iceshrimp.Frontend/Components/UserProfileCard.razor @@ -1,9 +1,10 @@ @inject ApiService Api; @using Iceshrimp.Frontend.Core.Services @using Iceshrimp.Shared.Schemas.Web +@inject NavigationManager NavigationManager; @if (UserProfile != null) { -
+
@@ -34,4 +35,11 @@ { UserProfile = await Api.Users.GetUserProfile(User.Id); } + + private void Open() + { + var username = $"@{User.Username}"; + if (User.Host != null) username += $"@{User.Host}"; + NavigationManager.NavigateTo($"/{username}"); + } } \ No newline at end of file diff --git a/Iceshrimp.Frontend/Components/UserProfileCard.razor.css b/Iceshrimp.Frontend/Components/UserProfileCard.razor.css index b1f14cbd..1913fa11 100644 --- a/Iceshrimp.Frontend/Components/UserProfileCard.razor.css +++ b/Iceshrimp.Frontend/Components/UserProfileCard.razor.css @@ -19,7 +19,7 @@ border-radius: 1rem; background-color: var(--foreground-color); max-width: 45rem; - margin: 1rem auto auto; + margin-top: 1rem; width: 100%; }