TourIAm/TIAMWebApp/Client/App.razor

39 lines
1.7 KiB
Plaintext

@using Microsoft.AspNetCore.Components.Authorization
@using TIAMSharedUI.Shared
@* <Router AppAssembly="@typeof(App).Assembly" AdditionalAssemblies="new [] { typeof(MainLayout).Assembly}">
<Found Context="routeData">
<RouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)" />
<FocusOnNavigate RouteData="@routeData" Selector="h1" />
</Found>
<NotFound>
<PageTitle>Not found</PageTitle>
<LayoutView Layout="@typeof(MainLayout)">
<p role="alert">Sorry, there's nothing at this address.</p>
</LayoutView>
</NotFound>
</Router> *@
<CascadingAuthenticationState>
<Router AppAssembly="@typeof(App).Assembly" AdditionalAssemblies="new [] { typeof(MainLayout).Assembly}">
<Found Context="routeData">
<AuthorizeRouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)">
<NotAuthorized>
<div class="text-center m-5">
<h1>Restricted area</h1>
<h2 style="font-size:small">Sorry, you are not authorized to view this!</h2>
</div>
</NotAuthorized>
</AuthorizeRouteView>
<FocusOnNavigate RouteData="@routeData" Selector="h1" />
</Found>
<NotFound>
<PageTitle>Not found</PageTitle>
<LayoutView Layout="@typeof(MainLayout)">
<div class="text-center m-5">
<h1>Oops...</h1>
<h2 style="font-size:small">Sorry, we can't find the content you asked for!</h2>
</div>
</LayoutView>
</NotFound>
</Router>
</CascadingAuthenticationState>