Ejemplo n.º 1
0
        protected async Task Load()
        {
            Category = await CategoryApiService.Get(Id);

            Events = await EventApiService.GetUpcomingForCategory(Id);

            IsLoading = false;
        }
Ejemplo n.º 2
0
        protected async Task Load()
        {
            var category = await CategoryApiService.Get(Id);

            Name           = category.Name;
            UpcomingEvents = await EventApiService.GetUpcomingForCategory(Id);

            IsLoading = false;
            StateHasChanged();
        }
Ejemplo n.º 3
0
        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();
        }
Ejemplo n.º 4
0
        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();
        }
Ejemplo n.º 5
0
        protected async Task Load()
        {
            Items = await CategoryApiService.Get();

            IsLoading = false;
        }