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

Next Js typescript and Shadcn night mode

Vincent 160

@Vincent-Wirwicki

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


What are you most proud of, and what would you do differently next time?

Getting more confidant with next JS.

What challenges did you encounter, and how did you overcome them?

Data from the api can be weird when using typescript because there is lots of [key:string]:{/something/}. I found a solution how to access these key value, but there are problably better ways to do that.

For the night mode I use a cheesy solution with Shadcn docs, but the idea is to have 2 values for the same the CSS variable and swap them if the night mode is on or off.

Community feedback

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