feat: Added Dark Mode but Needs Fixing After fetching Data
Summary
I have added a dark mode feature that works when toggled. However, I noticed an issue: after an API call, the dark mode toggle stops working. I am not sure why this happens, as I am using GitHub Codespaces.
Changes Made
- Implemented dark mode toggle using JavaScript.
- Updated background and text colors for dark mode.
- Saved dark mode state in localStorage.
Issue Found
- After making an API call, some elements lose dark mode styles.
- The toggle button stops responding after an API call.
Next Steps
- I will debug this issue further, but any suggestions are welcome!
- If this PR is merged, we can open a new issue to track the dark mode bug.
Please review and let me know if I should make changes before merging! 😊
these two screenshots showcasing issues
https://github.com/user-attachments/assets/c45d2a7a-358f-466d-82a8-03e0f75fec49
https://github.com/user-attachments/assets/f563b18f-2d81-4461-a85d-ce38f0f9b2ad
i did this now i will draft my PR review my code i did changes in utils.js and templates and components
The frontend was rendered for each call and then the entire dom was replaced. This is not the case anymore, we do perform real API calls and then populate the front using JS.
Closing for now, a darktheme feature is something we needs, but we going to have some work before adding it.