Skip to content

Commit fbb8eb4

Browse files
committed
[dark-mode] Fix: Initialize ThemeToggle module in docReady
The ThemeToggle module was instantiated but never initialized, causing the theme toggle button to be non-functional in the UI. The module's init() method is now called during document ready, ensuring the button properly listens for clicks and updates the theme. This was the final blocker preventing dark mode toggle from working in the deployed application.
1 parent 0fb7bdf commit fbb8eb4

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

src/frontend/js/app.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,18 @@ class Docs {
4646
});
4747

4848
console.log('CodeX Docs initialized');
49+
}
50+
51+
/**
52+
* Initialize theme toggle module
53+
*/
54+
initThemeToggle() {
55+
this.themeToggle.init();
4956
} /**
5057
* Document is ready
5158
*/
5259
docReady() {
60+
this.initThemeToggle();
5361
this.moduleDispatcher = new ModuleDispatcher({
5462
Library: this,
5563
});

0 commit comments

Comments
 (0)