@page "/statuslog/latest"
Statuses
This component demonstrates showing data from the omg.lol API.
@if (statuses == null)
{
Loading...
}
else
{
@foreach (var status in statuses) {
@status.Address
@status.HtmlContent
@status.RelativeTime
@if(!string.IsNullOrEmpty(status.ExternalUrl)) {
Respond
}
}
}
@code {
private Status[]? statuses;
protected override async Task OnInitializedAsync()
{
RestService api = new RestService();
statuses = (await api.StatuslogLatest()).ToArray();
}
}