-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.razor
21 lines (20 loc) · 858 Bytes
/
App.razor
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
@using Microsoft.AspNetCore.Components.Routing
@using blazorHramBabynino.Pages.Shared
<CascadingAuthenticationState>
<Router AppAssembly="@typeof(Program).Assembly">
<Found Context="routeData">
<AuthorizeRouteView RouteData="@routeData" DefaultLayout="@typeof(DefaultLayout)">
<NotAuthorized>
<blazorHramBabynino.Areas.ControlPanel.Pages.Shared.RedirectToLogin />
</NotAuthorized>
</AuthorizeRouteView>
</Found>
<NotFound>
<LayoutView Layout="typeof(ErrorLayout)">
<div class="container mt-3">
<h4 class="text-danger text-center">Страница не найдена</h4>
</div>
</LayoutView>
</NotFound>
</Router>
</CascadingAuthenticationState>