How to make login page not affected by nested routing #3421
-
Hello!
The folder structure is simple and looks like this:
With setup, I understand why the sidebar is present on my login page. But I don't know how to structure my files and write my code in order to have my sidebar appear on all pages except /login. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
What you need is to move the layout out of root to a pathless layout route, see https://remix.run/docs/en/v1/api/conventions#pathless-layout-routes. That way routes inside the pathless layout route will have the sidebar and routes outside will not have it, the final file structure may look something like this
|
Beta Was this translation helpful? Give feedback.
What you need is to move the layout out of root to a pathless layout route, see https://remix.run/docs/en/v1/api/conventions#pathless-layout-routes.
That way routes inside the pathless layout route will have the sidebar and routes outside will not have it, the final file structure may look something like this