Gordon Pedersen
5fb95c8305
Unfortunately it does not refresh at first login. Have to figure out how to make it refresh
18 lines
693 B
Text
18 lines
693 B
Text
@using Microsoft.AspNetCore.Components.Authorization
|
|
<Router AppAssembly="@typeof(MauiProgram).Assembly">
|
|
<Found Context="routeData">
|
|
<AuthorizeRouteView RouteData="@routeData" DefaultLayout="@typeof(Layout.MainLayout)">
|
|
<Authorizing>Logging in...</Authorizing>
|
|
<NotAuthorized><RedirectToLogin /></NotAuthorized>
|
|
</AuthorizeRouteView>
|
|
<FocusOnNavigate RouteData="@routeData" Selector="h1" />
|
|
</Found>
|
|
<NotFound>
|
|
<CascadingAuthenticationState>
|
|
<LayoutView Layout="@typeof(Layout.MainLayout)">
|
|
<img data-emoji="🦒" />
|
|
<p>Sorry, there's nothing here.</p>
|
|
</LayoutView>
|
|
</CascadingAuthenticationState>
|
|
</NotFound>
|
|
</Router>
|