Next.js Discord

Discord Forum

How To Disable Navbar and Header In notFound Page?

Answered
Cairn Terrier posted this in #help-forum
Open in Discord
Cairn TerrierOP
hey guys i get a little bit confused about this, here is my code, i already check the page is admin or test page and disable the navbar and header, but i don't know how to disable it in notFound Page, does anyone know how to do it?
Answered by Arinji
So you have a navbar set in a layout right @Cairn Terrier
View full answer

9 Replies

What I would do, is seperate with route group
So you have a navbar set in a layout right @Cairn Terrier
Answer
What you can do is seperate your app dir into (navbar) and (no navbar) anything with a navbar goes into navbar, anything without goes into no navbar
Or what you could do, is in the 404 page you just have a fixed div above the navbar essentially hiding it
@Arinji Or what you could do, is in the 404 page you just have a fixed div above the navbar essentially hiding it
Cairn TerrierOP
Nice idea, so i should make custom 404 page, and make it above the navbar right?
Is there any method i can try?
@Arinji Yup
Cairn TerrierOP
okay, thanks for your advice