Skip to content
Submitted almost 2 years ago

Next Js typescript and Shadcn night mode

next, tailwind-css, typescript
LVL 2
Vincent160
@Vincent-Wirwicki
A solution to the REST Countries API with color theme switcher challenge

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.

Code
Loading...

Please log in to post a comment

Log in

Community feedback

No feedback yet. Be the first to give feedback on Vincent’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