feat(client): migrate MainLayout.razor to IAuthApiClient

- Replace IAuthService with IAuthApiClient for logout functionality
- Add @using JdeScoping.Core.ApiContracts
- LogoutAsync now calls AuthApi.LogoutAsync() and navigates to login
  regardless of API result
This commit is contained in:
Joseph Doherty
2026-01-06 10:27:24 -05:00
parent b555f57b72
commit 20f9a1c683
@@ -1,5 +1,6 @@
@inherits LayoutComponentBase @inherits LayoutComponentBase
@inject IAuthService AuthService @using JdeScoping.Core.ApiContracts
@inject IAuthApiClient AuthApi
@inject NavigationManager NavigationManager @inject NavigationManager NavigationManager
<RadzenLayout> <RadzenLayout>
@@ -53,7 +54,8 @@
@code { @code {
private async Task LogoutAsync() private async Task LogoutAsync()
{ {
await AuthService.LogoutAsync(); // Call logout API - navigate to login regardless of result
await AuthApi.LogoutAsync();
NavigationManager.NavigateTo("/login"); NavigationManager.NavigateTo("/login");
} }