20 lines
747 B
Plaintext
20 lines
747 B
Plaintext
@using Microsoft.AspNetCore.Components.Authorization
|
|
@using MidrandBookshop.Components.Pages
|
|
|
|
<CascadingAuthenticationState>
|
|
<Router AppAssembly="@typeof(Program).Assembly">
|
|
<Found Context="routeData">
|
|
<AuthorizeRouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)">
|
|
<NotAuthorized>
|
|
<RedirectToLogin />
|
|
</NotAuthorized>
|
|
</AuthorizeRouteView>
|
|
<FocusOnNavigate RouteData="@routeData" Selector="h1" />
|
|
</Found>
|
|
<NotFound>
|
|
<LayoutView Layout="@typeof(MainLayout)">
|
|
<NotFound />
|
|
</LayoutView>
|
|
</NotFound>
|
|
</Router>
|
|
</CascadingAuthenticationState> |