Next.js Discord

Discord Forum

Change body for one page without affecting another

Answered
Laysan Albatross posted this in #help-forum
Open in Discord
Laysan AlbatrossOP
No matter what I'm doing, as soon as I add a <body> tag in one of my component, the RootLayoutComponent doesn't like that, which results in an error. When using a .css file, it gets globally overwritten, no matter where this css file is located.
Inline style like you can see in the screenshot also doesn't work..

Maybe I should add a parallel route for the file where I want my body changed? Idk.. That also sounds stupid xd
Answered by Laysan Albatross
I really just removed the RootLayout under /app and created a route group for everything that should be rendered slightly different..
Idk if thats the way to go, but it works, so fck it
View full answer

1 Reply

Laysan AlbatrossOP
I really just removed the RootLayout under /app and created a route group for everything that should be rendered slightly different..
Idk if thats the way to go, but it works, so fck it
Answer