Design comparison
Solution retrospective
Please enlighten me how to change the border country code to its name. Thank you
Community feedback
- @EdimarioJrPosted over 4 years ago
The names in the borders array are in the alpha3Code format.
In every country object, there is a field that stores the name of the country in this alpha3Code.
Apply the map method in the border array, iterating over the data from the api to find the countries where the border = alpha3code, and then replace it.
//data is the data from the api
borders = borders .map( (current) =>{ data.forEach((country)=>{ if( country.alpha3Code === current) current = country.name }) return `<a href="detail.html?=${current}"><div class="button">${current}</div></a>` } )
1 - @nasrattPosted over 4 years ago
while searching for the country the alert is really annoying change it to something else; maybe a text message below search field or some message on top of the page.
Great and Nice
0
Please log in to post a comment
Log in with GitHubJoin 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