How to make my dark mode only work in the layout i want
Answered
Giant resin bee posted this in #help-forum
Giant resin beeOP
I have root layout and dashboard layout , but I only pass ThemeProvider to dashboard layout , but when I switch to darkmode my landingpage is also affected.
Thank you everyone for reading, if you have a solution please help me, thank you very much
Thank you everyone for reading, if you have a solution please help me, thank you very much
Answered by @ts-ignore
use layout groups. In group of your landing page add ThemeProvider and it has a prop to force a theme, use that then create another route group for rest of your page and add ThemeProvider in that without any force prop
6 Replies
How do you style your landing page? depending on light/dark mode?
@Giant resin bee
@Giant resin bee
what do you use btw for styling?
Giant resin beeOP
I built a landing page from some shadcn ui components so there is a light/dark mode available. Is there a way for me to refuse light/dark mode for that layout without having to restyle the component?
@Giant resin bee I built a landing page from some shadcn ui components so there is a light/dark mode available. Is there a way for me to refuse light/dark mode for that layout without having to restyle the component?
use layout groups. In group of your landing page add ThemeProvider and it has a prop to force a theme, use that then create another route group for rest of your page and add ThemeProvider in that without any force prop
Answer
Giant resin beeOP
it worked, thank you very much ❤️
Thank you everyone, have a good day !