time-tracking-dashboard-responsive

Solution retrospective
I completed this challenge in 1day. I would like to improve my speed next time.
What challenges did you encounter, and how did you overcome them?CSS and getting data from json file was challenging. I overcome it by writing a generic code for each card, following DRY principle of programming.
What specific areas of your project would you like help with?Please help me with responsiveness across different devices.
Please log in to post a comment
Log in with GitHubCommunity feedback
- @2AWebDeveloper
Hello, There is a problem in your code that is causing an error in receiving data from the api.
Solution:
async function fetchData() { // Change the url to this address 👇👇👇 const url = "./data.json"; fetch(url) .then((res) => { if (!res.ok) { console.log("something went wrong"); } return res.json(); }) .then((data) => { activities = [...data]; displayCards(activities); }); }
Good luck
Marked as helpful
Join our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord