Challenge 2: Results summary challenge using React

Solution retrospective
This is my second challenge. It took me a little longer than I thought because I had problems showing the icons whose path is stored in the JSON file. They just never appeared so I had to create my own Icon component and they finally appeared. It would be nice if you could help me figure out why the icons are not shown when I try to read the path from the JSON file like this:
{
data.map((data, i) => (
<div>
<img src={data.icon} alt={data.category} />
<ScoreComponent key={i} category={data.category} score={data.score} maxScore="100" />
</div>
))
}
If I do it like that it only shows the alt text.
Anyway, it was a lot of fun to complete this challenge. I am happy for every feedback.
Thanks in advance and happy coding!
Please log in to post a comment
Log in with GitHubCommunity feedback
No feedback yet. Be the first to give feedback on Alexej Kunz's solution.
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