@using Shogi.Contracts.Types; @using System.ComponentModel.DataAnnotations; @using System.Net; @using System.Text.Json; @inject ShogiApi ShogiApi
Creator Seats
@foreach (var session in allSessions) { }
@if (allSessions.Length == 0) {

There are no games being played.

}
@code { private SessionMetadata[] allSessions = Array.Empty(); protected override Task OnInitializedAsync() { return FetchSessions(); } async Task FetchSessions() { var sessions = await ShogiApi.GetAllSessionsMetadata(); Console.WriteLine("Session count {0}", sessions.Length); if (sessions != null) { this.allSessions = sessions; StateHasChanged(); } } }