@* Workaround for Rider "Bad compile constant value" bug *@ @attribute [Route(PageUri)] @using ArcaneLibs.Blazor.Components.Services @using Spacebar.Client.Core @using Spacebar.Models.Gateway @inject JsConsoleService jsConsole
@Client?.ApiHttpClient.BaseAddress
@Client?.Gateway.RawClientWebSocket.State
@code { private const string PageUri = "/channels/@me"; [Parameter, CascadingParameter] public required AuthenticatedSpacebarClient? Client { get; set { field = value; Console.WriteLine("Set client: " + value); } } protected override async Task OnParametersSetAsync() { if (Client == null) return; Client.Gateway.OnGatewayMessage.Add(async msg => { await jsConsole.Log("Received gateway message: ", msg); }); } }