using JobsJobsJobs.Shared; using System; namespace JobsJobsJobs.Client { /// /// Information about a user /// public record UserInfo(CitizenId Id, string Name); /// /// Client-side application state for Jobs, Jobs, Jobs /// public class AppState { public event Action OnChange = () => { }; private UserInfo? _user = null; /// /// The information of the currently logged-in user /// public UserInfo? User { get => _user; set { _user = value; NotifyChanged(); } } private string _jwt = ""; /// /// The JSON Web Token (JWT) for the currently logged-on user /// public string Jwt { get => _jwt; set { _jwt = value; NotifyChanged(); } } public AppState() { } private void NotifyChanged() => OnChange.Invoke(); } }