Help regarding directory based routing
I have this weird case where I need two layouts for protected and public routes
public -> /login|forget-password (those share a layout)
protected -> /dashboard|users (those share a layout)
As you can see, both of those don't have a prefix I can depend on.
I noticed that pathlessLayout might fix this but I can create only one of it ?
I am a bit confused on how to achieve this
3 Replies
rival-blackOP•5mo ago
from docs, this is the example that matches what Im talking about
but with this approach, I need to wrap every page with an AppLayout wrapper component right ?
Is pathlessLayout a reserved word because I think I managed to get it fixed with
_publicLayout
_protectedLayout
flat-fuchsia•5mo ago
don't use route groups for that
just use the _ prefixed files and directories
rival-blackOP•5mo ago
Yeah, I just thought that pathlessLayout was a reserved keyword but you can write anything you like.
thanks a lot man, I ended up with those 2
_publicLayout
_protectedLayout