#setting up different layout.tsx
4 messages · Page 1 of 1 (latest)
You could conditionally render header in the root layout depending on whether you’re on an admin page. If you have a nested layout the root layout will wrap around that layout which I’m guessing is not the desired outcome.
this is my current file structure
- routes
-- admin
--- index.tsx
--- layout.tsx
-- about
--- index.tsx
-- index.tsx
-- layout.tsx
i have setup different header and footer components for both root files, about page etc and for admin pages
i need to use 1 set of header and footer for all pages including root and 2nd set only for pages under admin like /admin/dashboard /admin/orders etc
but right now only the header and footer used for all other pages is applied even for admin pages