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

Where in the world - Using NextJS in TypeScript and the new app router

P

@robin-bosch

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 did this one a bit differently, not using the API and using the JSON file with the countries directly, due to performance issues with the API. I wrote a small Next.js backend replacing the API. First time using the app router of Next.js, let me know if I can improve on the usage of the app router, especially with the usage of the "use client" declaration.

Community feedback

@JustynaKorzycka

Posted

Nice work :) I found a small bug in your application: if I choose for example Curaçao there will be error. I'm guessing the problem may be that you're passing a foreign character to the url.

1

P

@robin-bosch

Posted

@JustynaKorzycka You are right, well spotted. I quickly implemented a fix for that. The function that converts the names to urls just ignored special characters. Thank you for your feedback :)

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