KoogleApp/src/Koogle.Web/Components/Routes.razor

25 lines
767 B
Plaintext

@using Koogle.Web.Components.Layout
@using Microsoft.AspNetCore.Components.Authorization
<Fluxor.Blazor.Web.StoreInitializer />
<CascadingAuthenticationState>
<Router AppAssembly="typeof(Program).Assembly">
<Found Context="routeData">
<AuthorizeRouteView RouteData="@routeData"
DefaultLayout="@typeof(MainLayout)">
<NotAuthorized>
<RedirectToLogin />
</NotAuthorized>
</AuthorizeRouteView>
</Found>
<NotFound>
<LayoutView Layout="@typeof(Layout.MainLayout)">
<p>Seite nicht gefunden.</p>
</LayoutView>
</NotFound>
</Router>
</CascadingAuthenticationState>