fix(routing): static Routes, InteractiveAuto HeadOutlet, drop DefaultLayout

Routes needs no render mode — layouts declare the interactive mode.
MainLayout (WASM) and CmsLayout (Server) are top-level islands with no
conflicting parent render mode. DefaultLayout removed so AuthBlocks auth
pages render self-contained without being forced into the WASM layout.
This commit is contained in:
Daniel Harvey
2026-05-18 23:39:44 -04:00
parent c20c7d0dbd
commit 90e07ea9d7
2 changed files with 4 additions and 6 deletions
+2 -2
View File
@@ -15,11 +15,11 @@
<link rel="stylesheet" href="styles/deepdrft-styles.css" />
<ImportMap />
<link rel="icon" type="image/ico" href="deepdrft-logo.ico" />
<HeadOutlet @rendermode="InteractiveServer" />
<HeadOutlet @rendermode="InteractiveAuto" />
</head>
<body>
<Routes @rendermode="InteractiveServer" />
<Routes />
<script src="_framework/blazor.web.js"></script>
<script src=@Assets["_content/MudBlazor/MudBlazor.min.js"]></script>
<script type="module">
+2 -4
View File
@@ -1,7 +1,7 @@
<Router AppAssembly="typeof(App).Assembly"
AdditionalAssemblies="new[] { typeof(DeepDrftWeb.Client._Imports).Assembly, typeof(DeepDrftCms._Imports).Assembly, typeof(AuthBlocksWeb._Imports).Assembly }">
<Found Context="routeData">
<AuthorizeRouteView RouteData="routeData" DefaultLayout="typeof(DeepDrftWeb.Client.Layout.MainLayout)">
<AuthorizeRouteView RouteData="routeData">
<NotAuthorized>
@{
NavigationManager.NavigateTo($"account/login?returnUrl={Uri.EscapeDataString(NavigationManager.Uri)}", forceLoad: true);
@@ -12,9 +12,7 @@
</Found>
<NotFound>
<PageTitle>Not found</PageTitle>
<LayoutView Layout="typeof(DeepDrftWeb.Client.Layout.MainLayout)">
<p role="alert">Sorry, there's nothing at this address.</p>
</LayoutView>
<p role="alert">Sorry, there's nothing at this address.</p>
</NotFound>
</Router>