blackjack/Components/Routes.razor
2025-04-16 14:27:41 +07:00

20 lines
607 B
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

@using Microsoft.AspNetCore.Components.Web
@using Microsoft.AspNetCore.Components.Routing
<Router AppAssembly="@typeof(Program).Assembly">
<Found Context="routeData">
@if (routeData.PageType.Name == "Index" || string.IsNullOrEmpty(routeData.PageType.Name))
{
<Navigate href="/blackjack" />
}
else
{
<RouteView RouteData="@routeData" />
}
</Found>
<NotFound>
<PageTitle>Не найдено</PageTitle>
<p role="alert">Извините, страница не найдена.</p>
</NotFound>
</Router>