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

React.js, react-router, flex, grid, axios

Filip 350

@filip65

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 appreciate any feedback. Not sure how to make the flag in the correct way. At beginning i thought that i will not be able to make it, but I thing that I did it quite well. In the other hand there are for sure a lot of things that could be done better.

Community feedback

@PraneetDixit

Posted

Hi!

Some points for improvement -

  • I guess the body background color in light mode is not correct.
  • You are sending a separate network request for every filter change. A better approach can be fetching all countries once on the initial page load, storing the data in a variable and performing all the filter operations on the stored data.
  • There are many ways to manage the country flag. If you want to keep using the flag as a background image, you can change the background styling as below :-
/*** CSS ***/
.image{
    background-size: contain; /* So that you don't end up cutting the flag */
    background-position: top; /* Keeping the flag on top */
    background-repeat: no-repeat; /* Don't repeat the background */
}
  • The icon and text in theme changer are misaligned.
/*** CSS ***/
.theme-toggle{
    align-items: center;
}
  • Set cursor: pointer on clickable elements.

Some additional improvements (optional) -

  • You can set pagination or infinite scrolling for long lists of countries.
  • Allow users to directly visit country detail view by entering url in browser like https://countries-search-api.netlify.app/detail/India.

Happy Coding!

0

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