Application creating but without past visas and visits

This commit is contained in:
2024-09-06 23:31:07 +03:00
parent f90a0e7e82
commit c197a45f83
24 changed files with 516 additions and 86 deletions

View File

@@ -1,4 +1,6 @@
<CascadingValue Value="this">
@using System.Net
@using VisaApiClient
<CascadingValue Value="this">
@ChildContent
</CascadingValue>
@@ -7,8 +9,13 @@
[Parameter]
public RenderFragment? ChildContent { get; set; }
[Inject] private NavigationManager Nav { get; set; } = null!;
public void Handle(Exception ex)
{
if (ex is ApiException<ProblemDetails> { StatusCode: (int)HttpStatusCode.Unauthorized or (int)HttpStatusCode.Forbidden })
{
Nav.NavigateTo("/");
}
}
}