24 lines
854 B
Plaintext
24 lines
854 B
Plaintext
@using Microsoft.AspNetCore.Components.Routing
|
|
<Router AppAssembly="@typeof(Program).Assembly">
|
|
<Found Context="routeData">
|
|
<AuthorizeRouteView RouteData="@routeData" DefaultLayout="@typeof(BasicLayout)">
|
|
<NotAuthorized>
|
|
@if (context == null || context.User.Identity ==null || !context.User.Identity.IsAuthenticated)
|
|
{
|
|
<RedirectToLogin></RedirectToLogin>
|
|
}
|
|
else
|
|
{
|
|
|
|
}
|
|
</NotAuthorized>
|
|
</AuthorizeRouteView>
|
|
@* <RouteView RouteData="@routeData" DefaultLayout="@typeof(BasicLayout)" />
|
|
*@ </Found>
|
|
<NotFound>
|
|
<LayoutView Layout="@typeof(BasicLayout)">
|
|
<Result Status="404" />
|
|
</LayoutView>
|
|
</NotFound>
|
|
</Router>
|
|
<AntContainer /> |