REST API Country Viewer with Dark Mode, Made With Next.js
Design comparison
Solution retrospective
One thing I wasn't able to get working was making the bordering countries on the Country Details page render with their common name instead of their 3 letter country code. For this to work without the page asking the API for every country at once, I imagine the page would need to make another API request after pulling information for the main country, but I couldn't manage to get it to work.
Is the way I handled adding a dark mode toggle the best way? I wrapped the Header component and the contents of the page in a container and used a boolean state to handle if dark mode is toggled on or not.
Community feedback
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