18 lines
426 B
C#
18 lines
426 B
C#
using Microsoft.AspNetCore.Components;
|
|
|
|
namespace Webshop.App.Components
|
|
{
|
|
public partial class InboxCounter
|
|
{
|
|
private int MessageCount;
|
|
|
|
[Inject]
|
|
public ApplicationState? ApplicationState { get; set; }
|
|
protected override void OnInitialized()
|
|
{
|
|
MessageCount = new Random().Next(10);
|
|
ApplicationState.NumberOfMessages = MessageCount;
|
|
}
|
|
}
|
|
}
|