protected async Task HandlePageChanged(int selectedPage) { Page = selectedPage; var data = await TVService.GetTopRatedTVAsync(Page); SetTVData(data); }
protected override async Task OnInitializedAsync() { var popularTvShows = await TVService.GetPopularTVAsync(); var topRatedTvShows = await TVService.GetTopRatedTVAsync(); var onTheAirTvShows = await TVService.GetOnTheAirTVAsync(); if (popularTvShows is not null && topRatedTvShows is not null && onTheAirTvShows is not null) { PopularTVShows = popularTvShows.Results; TopRatedTVShows = topRatedTvShows.Results; OnTheAirTVShows = onTheAirTvShows.Results; } }
protected override async Task OnInitializedAsync() { var data = await TVService.GetTopRatedTVAsync(Page); SetTVData(data); }