T
TanStack•3w ago
rival-black

Question on route path

Hey guys! Thanks for the great libraries shipped! I have a question regarding paths for the file base routing. I want to have shallow paths for authenticated users, for example: /dashboard, /settings and so on. I've created a route.tsx file that catches all of this inside of the (organization) group, but this is also catching the route in the landing page. How do I sort this problem out? The route.tsx file, has the layout of the authenticated paths.
. šŸ“‚ routes
└── šŸ“‚ (authenticated)/
│ └── šŸ“‚ $slug/
│ └── šŸ“‚ (organization)/
│ ā”œā”€ā”€ šŸ“„ dashboard.tsx
│ ā”œā”€ā”€ šŸ“„ index.tsx
│ └── šŸ“‚ projects/
│ ā”œā”€ā”€ šŸ“„ index.tsx
│ ā”œā”€ā”€ šŸ“„ route.tsx
│ ā”œā”€ā”€ šŸ“„ settings.{-$tab}.tsx
│ └── šŸ“‚ (project)/
│ └── šŸ“‚ projects/
│ ā”œā”€ā”€ šŸ“„ $projectId.tsx
│ ā”œā”€ā”€ šŸ“„ route.tsx
│ ā”œā”€ā”€ šŸ“„ route.tsx
│ └── šŸ“‚ (user)/
│ ā”œā”€ā”€ šŸ“„ dashboard.tsx
│ ā”œā”€ā”€ šŸ“„ route.tsx
│ ā”œā”€ā”€ šŸ“„ settings.tsx
└── šŸ“‚ (authentication)/
│ ā”œā”€ā”€ šŸ“„ signin.tsx
│ ā”œā”€ā”€ šŸ“„ signup.tsx
└── šŸ“‚ (landing)/
│ ā”œā”€ā”€ šŸ“„ index.tsx
└── šŸ“„ __root.tsx
. šŸ“‚ routes
└── šŸ“‚ (authenticated)/
│ └── šŸ“‚ $slug/
│ └── šŸ“‚ (organization)/
│ ā”œā”€ā”€ šŸ“„ dashboard.tsx
│ ā”œā”€ā”€ šŸ“„ index.tsx
│ └── šŸ“‚ projects/
│ ā”œā”€ā”€ šŸ“„ index.tsx
│ ā”œā”€ā”€ šŸ“„ route.tsx
│ ā”œā”€ā”€ šŸ“„ settings.{-$tab}.tsx
│ └── šŸ“‚ (project)/
│ └── šŸ“‚ projects/
│ ā”œā”€ā”€ šŸ“„ $projectId.tsx
│ ā”œā”€ā”€ šŸ“„ route.tsx
│ ā”œā”€ā”€ šŸ“„ route.tsx
│ └── šŸ“‚ (user)/
│ ā”œā”€ā”€ šŸ“„ dashboard.tsx
│ ā”œā”€ā”€ šŸ“„ route.tsx
│ ā”œā”€ā”€ šŸ“„ settings.tsx
└── šŸ“‚ (authentication)/
│ ā”œā”€ā”€ šŸ“„ signin.tsx
│ ā”œā”€ā”€ šŸ“„ signup.tsx
└── šŸ“‚ (landing)/
│ ā”œā”€ā”€ šŸ“„ index.tsx
└── šŸ“„ __root.tsx
1 Reply
rival-black
rival-blackOP•3w ago
I got it working by using pathless routes

Did you find this page helpful?