diff --git a/src/BootstrapBlazor.Server/Components/App.razor b/src/BootstrapBlazor.Server/Components/App.razor
index 3ac0591918d..4215b39dee7 100644
--- a/src/BootstrapBlazor.Server/Components/App.razor
+++ b/src/BootstrapBlazor.Server/Components/App.razor
@@ -5,6 +5,15 @@
+
diff --git a/src/BootstrapBlazor.Server/Components/Layout/BaseLayout.razor.cs b/src/BootstrapBlazor.Server/Components/Layout/BaseLayout.razor.cs
index 7ddddcb492a..d74e48749e6 100644
--- a/src/BootstrapBlazor.Server/Components/Layout/BaseLayout.razor.cs
+++ b/src/BootstrapBlazor.Server/Components/Layout/BaseLayout.razor.cs
@@ -3,9 +3,6 @@
// See the LICENSE file in the project root for more information.
// Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone
-using Microsoft.Extensions.Options;
-using Microsoft.JSInterop;
-
namespace BootstrapBlazor.Server.Components.Layout;
///
@@ -13,10 +10,6 @@ namespace BootstrapBlazor.Server.Components.Layout;
///
public partial class BaseLayout : IAsyncDisposable
{
- [Inject]
- [NotNull]
- private IJSRuntime? JSRuntime { get; set; }
-
[Inject]
[NotNull]
private IStringLocalizer? Localizer { get; set; }
@@ -33,10 +26,6 @@ public partial class BaseLayout : IAsyncDisposable
[NotNull]
private IDispatchService? RebootDispatchService { get; set; }
- [Inject]
- [NotNull]
- private IOptions? WebsiteOption { get; set; }
-
[NotNull]
private string? FlowText { get; set; }
@@ -75,8 +64,6 @@ protected override async Task OnInitializedAsync()
await CommitDispatchService.SubscribeAsync(NotifyCommit);
await RebootDispatchService.SubscribeAsync(NotifyReboot);
- var module = await JSRuntime.LoadModule($"{WebsiteOption.Value.JSModuleRootPath}Layout/BaseLayout.razor.js");
- await module.InvokeVoidAsync("initTheme");
_init = true;
}
diff --git a/src/BootstrapBlazor.Server/Components/Layout/BaseLayout.razor.js b/src/BootstrapBlazor.Server/Components/Layout/BaseLayout.razor.js
deleted file mode 100644
index b143375ae13..00000000000
--- a/src/BootstrapBlazor.Server/Components/Layout/BaseLayout.razor.js
+++ /dev/null
@@ -1,6 +0,0 @@
-import { getTheme, setTheme } from "../../_content/BootstrapBlazor/modules/utility.js"
-
-export function initTheme() {
- const currentTheme = getTheme();
- setTheme(currentTheme, false);
-}
diff --git a/src/BootstrapBlazor.Server/Components/Layout/ErrorLayout.razor b/src/BootstrapBlazor.Server/Components/Layout/ErrorLayout.razor
deleted file mode 100644
index 4f3f76da517..00000000000
--- a/src/BootstrapBlazor.Server/Components/Layout/ErrorLayout.razor
+++ /dev/null
@@ -1,3 +0,0 @@
-@inherits LayoutComponentBase
-
-@Body
diff --git a/src/BootstrapBlazor.Server/Components/Pages/Error.razor b/src/BootstrapBlazor.Server/Components/Pages/Error.razor
index 65c30e76bdd..4b1e178ebc4 100644
--- a/src/BootstrapBlazor.Server/Components/Pages/Error.razor
+++ b/src/BootstrapBlazor.Server/Components/Pages/Error.razor
@@ -1,5 +1,4 @@
@page "/error"
-@layout ErrorLayout
Error.
An error occurred while processing your request.