myhn/Apps/BlazorClient/Shared/Notifications.razor
2021-01-08 16:26:19 +01:00

21 lines
358 B
Plaintext

@inject NotificationManager Notification
@implements IDisposable
<div class="notifications">
@foreach (var message in Notification.Messages)
{
<p>@message</p>
}
</div>
@code {
protected override void OnInitialized()
{
Notification.OnChange += StateHasChanged;
}
public void Dispose()
{
Notification.OnChange -= StateHasChanged;
}
}