fix: add Router Found template to resolve Blazor routing error
Router component requires Found and NotFound child templates. Adds RouteView with MainLayout as default layout and NotFound error page. Fixes: "Router component requires a value for the parameter Found" error Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -24,7 +24,19 @@
|
|||||||
<CascadingAuthenticationState>
|
<CascadingAuthenticationState>
|
||||||
<Router AppAssembly="@typeof(App).Assembly"
|
<Router AppAssembly="@typeof(App).Assembly"
|
||||||
AdditionalAssemblies="new[] { typeof(QuantEngine.Web.Client.Pages.Dashboard).Assembly }"
|
AdditionalAssemblies="new[] { typeof(QuantEngine.Web.Client.Pages.Dashboard).Assembly }"
|
||||||
OnNavigateAsync="@OnNavigateAsync" />
|
OnNavigateAsync="@OnNavigateAsync">
|
||||||
|
<Found Context="routeData">
|
||||||
|
<RouteView RouteData="@routeData" DefaultLayout="@typeof(QuantEngine.Web.Client.Layout.MainLayout)" />
|
||||||
|
<FocusOnNavigate RouteData="@routeData" Selector="h1" />
|
||||||
|
</Found>
|
||||||
|
<NotFound>
|
||||||
|
<PageTitle>페이지를 찾을 수 없음</PageTitle>
|
||||||
|
<div class="alert alert-danger">
|
||||||
|
<h3>404 - 페이지를 찾을 수 없습니다</h3>
|
||||||
|
<p>요청하신 페이지가 존재하지 않습니다.</p>
|
||||||
|
</div>
|
||||||
|
</NotFound>
|
||||||
|
</Router>
|
||||||
</CascadingAuthenticationState>
|
</CascadingAuthenticationState>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user