From 88c4f70aa4b29ee4dd8b494e125551d4378f59da Mon Sep 17 00:00:00 2001 From: Greg Date: Thu, 29 May 2025 16:45:51 +0200 Subject: [PATCH] feat: initialize main app module with data loading and UI setup --- js/app.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/js/app.js b/js/app.js index da57f0a..8b45741 100644 --- a/js/app.js +++ b/js/app.js @@ -2,9 +2,16 @@ * Main Application Module * Entry point for the application, initializes all components */ -document.addEventListener('DOMContentLoaded', () => { +document.addEventListener('DOMContentLoaded', async () => { // 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(); Charts.init();