hn-dotnet/Apps/Client/Shared/Toasts.razor

20 lines
331 B
Plaintext

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