@page "/" @using Selector.MAUI.Services; @inject ILogger logger; @inject NavigationManager NavManager; @inject SessionManager sessionManager;

Loading...

@code { protected async override Task OnInitializedAsync() { logger.LogInformation("Starting up"); await sessionManager.LoadUserFromDisk(); if (sessionManager.IsLoggedIn) { logger.LogInformation("User logged in, navigating to main app"); NavManager.NavigateTo("/app"); } else { logger.LogInformation("User not logged in, navigating to login"); NavManager.NavigateTo("/login"); } } }