@page "/now"
@inject IJSRuntime JS
@inject State State
Feel free to stroll through the now.garden and take a look at what people are up to.
@if (garden != null) {
foreach (NowData now in garden) {
}
}
@code {
private List? garden;
protected override async Task OnInitializedAsync() {
await base.OnInitializedAsync();
if (garden == null || garden.Count == 0) garden = await State.GetNowGarden();
await InvokeAsync(StateHasChanged);
await JS.InvokeVoidAsync("removeElementById", "now-loading");
}
}