Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted over 2 years ago

Challenge 2: Results summary challenge using React

react
Alexej Kunz•60
@Orchi1904
A solution to the Results summary component challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

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!

Code
Loading...

Please log in to post a comment

Log in with GitHub

Community 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

Stay up to datewith new challenges, featured solutions, selected articles, and our latest news

Frontend Mentor

  • Unlock Pro
  • Contact us
  • FAQs
  • Become a partner

Explore

  • Learning paths
  • Challenges
  • Solutions
  • Articles

Community

  • Discord
  • Guidelines

For companies

  • Hire developers
  • Train developers
© Frontend Mentor 2019 - 2025
  • Terms
  • Cookie Policy
  • Privacy Policy
  • License