Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

html 5, scss, reactjs

#bem#fetch#react#sass/scss#typescript
Lebogang 90

@iLebo-stack

Desktop design screenshot for the REST Countries API with color theme switcher coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
  • API
4advanced
View challenge

Design comparison


SolutionDesign

Solution retrospective


I did not implement the button on the detail page because the names of the border countries are abbreviated, how could I use the given api to make this buttons work.

Community feedback

@Steentoons

Posted

From the data, each country has cca3 that has the abbreviations. You can use this to your advantage by using the current cca3 to return the whole country object. This can then be used to create the details for that particular country. In short, after clicking a border, you can get the innerHTML and check its cca3 from the data (use the lowercase version compared with name.common). after getting the country that matches the name, use the country's object to create the detailed contents. I hope you get the idea

Marked as helpful

1

Lebogang 90

@iLebo-stack

Posted

@Steentoons I'll work on it right away. Thanks

1

Please log in to post a comment

Log in with GitHub
Discord logo

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