Set page render mode

This commit is contained in:
Archangel
2025-10-10 14:52:59 +02:00
parent 3945869414
commit 5670e5a123
3 changed files with 19 additions and 4 deletions
@@ -6,14 +6,26 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<ImportMap />
<HeadOutlet />
<HeadOutlet @rendermode="PageRenderMode" />
</head>
<body>
<Routes/>
<Routes @rendermode="PageRenderMode" />
<script src="/_framework/blazor.web.js"></script>
</body>
</html>
@code {
[CascadingParameter]
private HttpContext HttpContext { get; set; } = default!;
private IComponentRenderMode? PageRenderMode
{
get
{
return HttpContext.AcceptsInteractiveRouting() ? InteractiveServer : null;
}
}
}
@@ -1,7 +1,7 @@
@using System.Reflection
@using SPTarkov.Server.Web.Components.Layout
<Router AppAssembly="@typeof(SPTWeb).Assembly">
<Router AppAssembly="@typeof(SPTWeb).Assembly" AdditionalAssemblies="SPTWeb.SptWebModsAssemblies">
<Found Context="routeData">
<RouteView RouteData="@routeData" DefaultLayout="@typeof(BaseMainLayout)" />
<FocusOnNavigate RouteData="@routeData" Selector="h1" />