Iceshrimp.NET/Iceshrimp.Frontend/App.razor

19 lines
No EOL
744 B
Text

@using Microsoft.AspNetCore.Components.Authorization
@using Iceshrimp.Frontend.Components
<Router AppAssembly="@typeof(App).Assembly">
<Found Context="routeData">
<AuthorizeRouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)">
<NotAuthorized>
<RedirectToLogin/>
</NotAuthorized>
</AuthorizeRouteView>
@* <RouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)"/> *@
<FocusOnNavigate RouteData="@routeData" Selector="h1"/>
</Found>
<NotFound>
<PageTitle>Not found</PageTitle>
<LayoutView Layout="@typeof(MainLayout)">
<p role="alert">Page not found.</p>
</LayoutView>
</NotFound>
</Router>