feat: initialize main app module with data loading and UI setup
This commit is contained in:
parent
1dcb6d6631
commit
88c4f70aa4
11
js/app.js
11
js/app.js
@ -2,9 +2,16 @@
|
|||||||
* Main Application Module
|
* Main Application Module
|
||||||
* Entry point for the application, initializes all components
|
* Entry point for the application, initializes all components
|
||||||
*/
|
*/
|
||||||
document.addEventListener('DOMContentLoaded', () => {
|
document.addEventListener('DOMContentLoaded', async () => {
|
||||||
// Initialize all modules
|
// Initialize all modules
|
||||||
DataManager.init();
|
try {
|
||||||
|
await DataManager.init(); // Wait for data to be loaded and processed
|
||||||
|
} catch (error) {
|
||||||
|
console.error('Failed to initialize DataManager:', error);
|
||||||
|
// Optionally, display an error message to the user in the UI
|
||||||
|
// For example, by setting some text in a dedicated error div.
|
||||||
|
// For now, we'll log and let the app proceed with potentially empty/default data.
|
||||||
|
}
|
||||||
UI.init();
|
UI.init();
|
||||||
Charts.init();
|
Charts.init();
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user