-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.razor
31 lines (31 loc) · 1.27 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
31
@using Web.Pages.Account
@using Web.Pages.Public
<CascadingAuthenticationState>
<Router AppAssembly="@typeof(Program).Assembly" PreferExactMatches="@true">
<Found Context="routeData">
<AuthorizeRouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)">
<NotAuthorized>
@if (context?.User?.Identity != null && !context.User.Identity.IsAuthenticated)
{
<LoginButton />
}
else
{
<AccessDenied />
}
</NotAuthorized>
</AuthorizeRouteView>
</Found>
<NotFound>
<LayoutView Layout="@typeof(MainLayout)">
<div class="d-grid place-items-center expand">
<img class=" expand mw-7" src="images/404.jpg"
alt="Sorry, there's nothing at this address." />
<MudText Typo="Typo.body2">
<a href="https://www.freepik.com/vectors/disconnect">Disconnect vector created by jcomp - www.freepik.com</a>
</MudText>
</div>
</LayoutView>
</NotFound>
</Router>
</CascadingAuthenticationState>