Files
blazor-swm/Features/Root/Routes.razor
T
2026-07-21 14:35:37 +07:00

26 lines
1.0 KiB
Plaintext

@using Indotalent.ConfigBackEnd.Interfaces
@using Indotalent.Features.Account.AccessDenied
@using Indotalent.Features.Root.NotFound
@using Microsoft.AspNetCore.Components.Authorization
<CascadingAuthenticationState>
<Router AppAssembly="typeof(Program).Assembly" NotFoundPage="typeof(NotFound.NotFoundPage)">
<Found Context="routeData">
<AuthorizeRouteView RouteData="routeData" DefaultLayout="typeof(Root.MainLayout)">
<NotAuthorized>
<RedirectToAccessDenied />
</NotAuthorized>
<Authorizing>
<div class="d-flex align-center justify-center mt-16">
<MudProgressCircular Color="Color.Primary" Indeterminate="true" />
<MudText Class="ml-3">Memverifikasi identitas...</MudText>
</div>
</Authorizing>
</AuthorizeRouteView>
<FocusOnNavigate RouteData="routeData" Selector="h1" />
</Found>
</Router>
</CascadingAuthenticationState>