diff --git a/src/JobsJobsJobs/Client/JobsJobsJobs.Client.csproj b/src/JobsJobsJobs/Client/JobsJobsJobs.Client.csproj index b231dcb..ce2a994 100644 --- a/src/JobsJobsJobs/Client/JobsJobsJobs.Client.csproj +++ b/src/JobsJobsJobs/Client/JobsJobsJobs.Client.csproj @@ -6,9 +6,10 @@ - - + + + diff --git a/src/JobsJobsJobs/Client/Pages/Citizen/Dashboard.razor b/src/JobsJobsJobs/Client/Pages/Citizen/Dashboard.razor index 0b21952..bfa6ba2 100644 --- a/src/JobsJobsJobs/Client/Pages/Citizen/Dashboard.razor +++ b/src/JobsJobsJobs/Client/Pages/Citizen/Dashboard.razor @@ -41,6 +41,7 @@ else { errorMessage = profileResult.Error; } + retrievingProfile = false; } } } diff --git a/src/JobsJobsJobs/Client/Pages/Counter.razor b/src/JobsJobsJobs/Client/Pages/Counter.razor deleted file mode 100644 index 8641f78..0000000 --- a/src/JobsJobsJobs/Client/Pages/Counter.razor +++ /dev/null @@ -1,16 +0,0 @@ -@page "/counter" - -

Counter

- -

Current count: @currentCount

- - - -@code { - private int currentCount = 0; - - private void IncrementCount() - { - currentCount++; - } -} diff --git a/src/JobsJobsJobs/Client/Pages/FetchData.razor b/src/JobsJobsJobs/Client/Pages/FetchData.razor deleted file mode 100644 index 84c59e5..0000000 --- a/src/JobsJobsJobs/Client/Pages/FetchData.razor +++ /dev/null @@ -1,46 +0,0 @@ -@page "/fetchdata" -@using JobsJobsJobs.Shared -@inject HttpClient Http - -

Weather forecast

- -

This component demonstrates fetching data from the server.

- -@if (forecasts == null) -{ -

Loading...

-} -else -{ - - - - - - - - - - - @foreach (var forecast in forecasts) - { - - - - - - - } - -
DateTemp. (C)Temp. (F)Summary
@forecast.Date.ToShortDateString()@forecast.TemperatureC@forecast.TemperatureF@forecast.Summary
-} - -@code { - private WeatherForecast[] forecasts; - - protected override async Task OnInitializedAsync() - { - forecasts = await Http.GetFromJsonAsync("WeatherForecast"); - } - -} diff --git a/src/JobsJobsJobs/Client/Program.cs b/src/JobsJobsJobs/Client/Program.cs index 4adaa42..b7c2c9d 100644 --- a/src/JobsJobsJobs/Client/Program.cs +++ b/src/JobsJobsJobs/Client/Program.cs @@ -2,10 +2,13 @@ using Microsoft.AspNetCore.Components.WebAssembly.Hosting; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; +using NodaTime; +using NodaTime.Serialization.SystemTextJson; using System; using System.Collections.Generic; using System.Net.Http; using System.Text; +using System.Text.Json; using System.Threading.Tasks; namespace JobsJobsJobs.Client @@ -19,6 +22,7 @@ namespace JobsJobsJobs.Client builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) }); builder.Services.AddSingleton(new AppState()); + builder.Services.AddSingleton(new JsonSerializerOptions().ConfigureForNodaTime(DateTimeZoneProviders.Tzdb)); await builder.Build().RunAsync(); } } diff --git a/src/JobsJobsJobs/Client/Shared/NavMenu.razor b/src/JobsJobsJobs/Client/Shared/NavMenu.razor index d0fc6c4..ff92828 100644 --- a/src/JobsJobsJobs/Client/Shared/NavMenu.razor +++ b/src/JobsJobsJobs/Client/Shared/NavMenu.razor @@ -1,5 +1,6 @@ @inject AppState state @inject NavigationManager nav +@implements IDisposable