forked from SteveSandersonMS/CarChecker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.razor
30 lines (30 loc) · 1.12 KB
/
App.razor
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<CascadingAuthenticationState>
<Router AppAssembly="@typeof(Program).Assembly">
<Found Context="routeData">
<AuthorizeRouteView RouteData="@routeData">
<Authorizing>
<LayoutView Layout="@typeof(HeaderLayout)">
<div class="loader"></div>
</LayoutView>
</Authorizing>
<NotAuthorized>
@if (!context.User.Identity.IsAuthenticated)
{
<NotLoggedIn />
}
else
{
<LayoutView Layout="@typeof(HeaderLayout)">
<p>You are not authorized to access this resource.</p>
</LayoutView>
}
</NotAuthorized>
</AuthorizeRouteView>
</Found>
<NotFound>
<LayoutView Layout="@typeof(HeaderLayout)">
<p>Sorry, there's nothing at this address.</p>
</LayoutView>
</NotFound>
</Router>
</CascadingAuthenticationState>