how to hide layout on 404 page
Answered
Norwegian Forest Cat posted this in #help-forum
Norwegian Forest CatOP
how to make my navbar showing in everypage except for the 404 page?
Answered by Alfonsus Ardani
You can create a route group where you put your navbar inside the route group so that when it redirects to the 404 page it doesn't include the navbar inside the route group
9 Replies
You can create a route group where you put your navbar inside the route group so that when it redirects to the 404 page it doesn't include the navbar inside the route group
Answer
Try
app/layout.tsx
app/(witHNavbar)/layout.tsx
@Alfonsus Ardani Try
tsx
app/layout.tsx
app/(witHNavbar)/layout.tsx
Norwegian Forest CatOP
soo the home page should be on the (withnavbar) directory right?
@Alfonsus Ardani Try
tsx
app/layout.tsx
app/(witHNavbar)/layout.tsx
Norwegian Forest CatOP
its working, thanks 👍
Norwegian Forest CatOP
what is this error? @Alfonsus Ardani
thats a separate problem
@Alfonsus Ardani thats a separate problem
Norwegian Forest CatOP
what does that error mean?
its another problem, maybe you can open up a thread and tell me about the issue