REST API Country Viewer with Dark Mode, Made With Next.js

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.
Please log in to post a comment
Log in with GitHubCommunity feedback
No feedback yet. Be the first to give feedback on Daniel Aadland's solution.
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