2022-02-14 01:51:52 +01:00
|
|
|
<CascadingState>
|
|
|
|
<CascadingAuthenticationState>
|
|
|
|
<Router AppAssembly="@typeof(App).Assembly">
|
|
|
|
<Found Context="routeData">
|
|
|
|
<AuthorizeRouteView DefaultLayout="@typeof(MainLayout)" RouteData="@routeData">
|
|
|
|
<NotAuthorized>
|
|
|
|
@if (context.User.Identity?.IsAuthenticated != true)
|
|
|
|
{
|
|
|
|
<RedirectToLogin/>
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
<p role="alert">You are not authorized to access this resource.</p>
|
|
|
|
}
|
|
|
|
</NotAuthorized>
|
|
|
|
</AuthorizeRouteView>
|
|
|
|
<FocusOnNavigate RouteData="@routeData" Selector="section"/>
|
|
|
|
</Found>
|
|
|
|
<NotFound>
|
|
|
|
<Title>Not found</Title>
|
|
|
|
<LayoutView Layout="@typeof(MainLayout)">
|
|
|
|
<p role="alert">Sorry, there's nothing at this address.</p>
|
|
|
|
</LayoutView>
|
|
|
|
</NotFound>
|
|
|
|
</Router>
|
|
|
|
</CascadingAuthenticationState>
|
|
|
|
</CascadingState>
|