[frontend/components] Use UserDisplayName in NotificationComponent

This commit is contained in:
pancakes 2024-11-24 14:51:19 +10:00
parent 0c8b79a489
commit c15832f37a
No known key found for this signature in database
GPG key ID: ED53D426432B861B

View file

@ -19,7 +19,9 @@
<div class="notification-body"> <div class="notification-body">
@if (NotificationResponse is { User: not null }) @if (NotificationResponse is { User: not null })
{ {
<span @onclick="OpenProfile" class="display-name">@(NotificationResponse.User.DisplayName ?? NotificationResponse.User.Username)</span> <span @onclick="OpenProfile" class="display-name">
<UserDisplayName User="@NotificationResponse.User" />
</span>
} }
@switch (NotificationResponse) @switch (NotificationResponse)