Hi! How to not render header component on register and log in page.
I have put my <Header/> component in my _app.tsx under my SessionProvider. But relise now that i dont want my header to show in register and login page. Where do i place my header or do i create some sort of function. Thanks!
Solution:Jump to solution
you can read about this here https://nextjs.org/docs/pages/building-your-application/routing/pages-and-layouts#examples
Routing: Pages and Layouts
Create your first page and shared layout with the Pages Router.
3 Replies
im guessing u are using pages routes
you can do what we call per-page layouts
Solution
you can read about this here https://nextjs.org/docs/pages/building-your-application/routing/pages-and-layouts#examples
Routing: Pages and Layouts
Create your first page and shared layout with the Pages Router.
That's what I ended up doing. Thanks!