Next.js Discord

Discord Forum

Navbar Component into root layout

Unanswered
Vizsla posted this in #help-forum
Open in Discord
VizslaOP
Hi, im trying to put a navbar in my layout file for my home page, i also put another layout for the sidebar into my dashboard folder in the app directory somehow i see the navbar in my dashboard, any reasons why?

20 Replies

Please provide more information, what is your project structure?
Are you using Route Groups? Normal layouts are nested by default
@fuma Please provide more information, what is your project structure?
VizslaOP
in my app directory i have my layout.js and my page.js
and my dashboard folder
in my dashboard folder i have layout.js and page.js
and some reason the navbar component is in my dashboard page
your layout is nested, it's expected that your navbar is displayed in dashboard folder
VizslaOP
how do i unnest it?
yes
VizslaOP
ohhh
so uh where do i put my navbar component
the docs have answered all these things, tbh, you really should read the docs before asking the question
VizslaOP
i was kinda confused
with the d ocs
Read through all the pages under routing category
@Vizsla so uh where do i put my navbar component
In the route group, with all pages that you expected to have a navbar