TourIAm/TIAMMobileApp/Main.razor

34 lines
1.3 KiB
Plaintext

@using Microsoft.AspNetCore.Components.Authorization
@using TIAMSharedUI.Shared
@* <Router AppAssembly="@typeof(Main).Assembly" AdditionalAssemblies="new [] { typeof(MainLayout).Assembly}">
<Found Context="routeData">
<RouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)" />
<FocusOnNavigate RouteData="@routeData" Selector="h1" />
</Found>
<NotFound>
<LayoutView Layout="@typeof(MainLayout)">
<p role="alert">Sorry, there's nothing at this address.</p>
</LayoutView>
</NotFound>
</Router> *@
<CascadingAuthenticationState>
<Router AppAssembly="@typeof(Main).Assembly" AdditionalAssemblies="new [] { typeof(MainLayout).Assembly}">
<Found Context="routeData">
<AuthorizeRouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)">
<NotAuthorized>
<p>Sorry dude, but you're not authorized!</p>
</NotAuthorized>
</AuthorizeRouteView>
<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>