@page "/citizen/dashboard" @inject HttpClient http @inject AppState state

Welcome, @state.User!.Name!

@if (retrievingProfile) {

Retrieving your employment profile...

} else if (profile != null) {

Your employment profile was last updated @profile.LastUpdatedOn

} else {

You do not have an employment profile established; click “Profile”* in the menu to get started!

* Once it's there...

} @if (errorMessage != null) {

@errorMessage

} @code { bool retrievingProfile = true; JobsJobsJobs.Shared.Profile? profile = null; string? errorMessage = null; protected override async Task OnInitializedAsync() { if (state.User != null) { var profileResult = await ServerApi.RetrieveProfile(http, state); if (profileResult.IsOk) { profile = profileResult.Ok; } else { errorMessage = profileResult.Error; } retrievingProfile = false; } } }