Set page render mode
This commit is contained in:
@@ -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" />
|
||||
|
||||
Reference in New Issue
Block a user