@page "/statuslog/latest"
@inject State State
@code {
private Status[] statuses;
private string statusContent = string.Empty;
private string? statusEmoji = null;
protected override async Task OnInitializedAsync()
{
}
private async ValueTask> GetStatuses(ItemsProviderRequest request)
{
// TODO: request.cancellationToken
statuses = (await State.GetStatuses()) ?? new Status[0];
var numStatuses = Math.Min(request.Count, statuses.Length - request.StartIndex);
return new ItemsProviderResult(statuses.Skip(request.StartIndex).Take(numStatuses), statuses.Length);
}
}