diff --git a/DeepDrftManager/Components/App.razor b/DeepDrftManager/Components/App.razor
index 846da47..845821d 100644
--- a/DeepDrftManager/Components/App.razor
+++ b/DeepDrftManager/Components/App.razor
@@ -8,6 +8,7 @@
+
diff --git a/DeepDrftManager/Components/Pages/Index.razor b/DeepDrftManager/Components/Pages/Index.razor
new file mode 100644
index 0000000..ed10f52
--- /dev/null
+++ b/DeepDrftManager/Components/Pages/Index.razor
@@ -0,0 +1,12 @@
+@page "/"
+@rendermode InteractiveServer
+@using AuthBlocksWeb.HierarchicalAuthorize
+@attribute [HierarchicalRoleAuthorize("Admin")]
+@inject NavigationManager NavigationManager
+
+@code {
+ protected override void OnInitialized()
+ {
+ NavigationManager.NavigateTo("/cms", replace: true);
+ }
+}
diff --git a/DeepDrftPublic.Client/Layout/DeepDrftMenu.razor b/DeepDrftPublic.Client/Layout/DeepDrftMenu.razor
index eb575c5..4c7ce0c 100644
--- a/DeepDrftPublic.Client/Layout/DeepDrftMenu.razor
+++ b/DeepDrftPublic.Client/Layout/DeepDrftMenu.razor
@@ -79,6 +79,13 @@
protected override async Task OnInitializedAsync()
{
+ // During SSR prerender the dark-mode state is already seeded by the server-side
+ // DarkModeService (via IHttpContextAccessor + DarkModeSettings + PersistentComponentState).
+ // Invoking the EventCallback here during prerender triggers a re-render cycle on the
+ // SSR renderer that never completes, hanging the page. Guard to interactive-only so
+ // the cookie sync only runs when the component is actually mounted in the browser.
+ if (!RendererInfo.IsInteractive) return;
+
IsDarkMode = DarkModeCookieService.GetDarkModeAsync();
await IsDarkModeChanged.InvokeAsync(IsDarkMode);
}