protected async Task Load() { Category = await CategoryApiService.Get(Id); Events = await EventApiService.GetUpcomingForCategory(Id); IsLoading = false; }
protected async Task Load() { var category = await CategoryApiService.Get(Id); Name = category.Name; UpcomingEvents = await EventApiService.GetUpcomingForCategory(Id); IsLoading = false; StateHasChanged(); }
protected async Task Load() { var authState = await AuthenticationStateProvider.GetAuthenticationStateAsync(); if (authState.User.Identity != null && authState.User.Identity.IsAuthenticated) { Categories = await CategoryApiService.Get(); } IsLoading = false; StateHasChanged(); }
public async void ToggleSidebar() { _expandNavMenu = !_expandNavMenu; if (_expandNavMenu) { IsLoading = true; StateHasChanged(); var authState = await AuthenticationStateProvider.GetAuthenticationStateAsync(); if (authState.User.Identity != null && authState.User.Identity.IsAuthenticated) { Categories = await CategoryApiService.Get(); IsLoading = false; } } StateHasChanged(); }
protected async Task Load() { Items = await CategoryApiService.Get(); IsLoading = false; }