Design comparison
Solution retrospective
I had a problem with files structure in this project, what is the best solution to deal with that?
Community feedback
- @GelianthusPosted over 1 year ago
Hello, can you please clarify which file are you having an issue with?
If it is on the frontend side, I think a grid layout works best on the homepage. And a combination of flex and grid on the detail page. I'd be happy to elaborate more on this, I'll see to your reply.
But if I have to guess, you're probably having an issue with the response of the API. I noticed your border displays the whole name of the country instead of their country code. I think your approach solves the problem of the outdated country code from the API's response which makes other countries inaccessible if you were to navigate through them using the border buttons. But you'd probably want to display the actual country code, for example, Jordan = JOR.
const response = await fetch("https://restcountries.com/v3.1/all"); const data = await response.json(); // this will return an array of all countries const countryCode = data[0].cioc // will return the country code of the country at index 0
I have to ask, did you encode the borders yourself?
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