@using Contracts.Types @using System.Net @inject ShogiApi ShogiApi @code { [Parameter] [EditorRequired] public Session Session { get; set; } = default!; protected override void OnParametersSet() { base.OnParametersSet(); if (Session == null) { throw new ArgumentException($"{nameof(Session)} cannot be null.", nameof(Session)); } } async Task OnClickJoinGame() { var response = await ShogiApi.PatchJoinGame(Session.SessionId.ToString()); response.EnsureSuccessStatusCode(); } }