Skip to content

Commit

Permalink
Update user profile URL structure
Browse files Browse the repository at this point in the history
Changed URL path for user profiles from `/p/{username}` to `/{username}`.
- Updated `UserListUrl` method in `ContactListModal.razor`.
- Modified `href` attributes in `SearchBarDisplay.razor` and `UserListItem.razor`.
- Adjusted page directive in `Profile.razor` to reflect new URL structure.
  • Loading branch information
sametcn99 committed Jul 9, 2024
1 parent cf7afc1 commit 13edaa3
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@

[Parameter] public ModalTitleEnum ModalTitle { get; set; }

private string UserListUrl(User user) => $"/p/{user.Login}";
private string UserListUrl(User user) => $"/{user.Login}";
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
@if (data?.Items != null)
{
<Virtualize Items="@data.Items" Context="item">
<a class="box" href="/p/@item.Login" style="display: flex; align-items: center; gap: 10px; text-decoration: none;">
<a class="box" href="/@item.Login" style="display: flex; align-items: center; gap: 10px; text-decoration: none;">
<figure class="image is-48x48">
<img src="@item.AvatarUrl" alt="@item.Login" class="is-rounded" />
</figure>
Expand Down
2 changes: 1 addition & 1 deletion GPVBlazor/GPVBlazor/Components/Displays/UserListItem.razor
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@using GPVBlazor.Models

<a class="media is-column-gap-1" href="/p/@user?.Login" @key="user?.NodeId" style="display: flex; align-items: center;">
<a class="media is-column-gap-1" href="/@user?.Login" @key="user?.NodeId" style="display: flex; align-items: center;">
<div class="image is-48x48 is-flex-shrink-0">
<img class="is-rounded" src="@user?.AvatarUrl" alt="Avatar" />
</div>
Expand Down
2 changes: 1 addition & 1 deletion GPVBlazor/GPVBlazor/Components/Pages/Profile.razor
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@page "/p/{Username}"
@page "/{Username}"
@rendermode InteractiveServer
@inject Services.Interfaces.IUserService UserService
@inject Services.Interfaces.IContactService ContactService
Expand Down

0 comments on commit 13edaa3

Please sign in to comment.