TanStackT
TanStackโ€ข4mo agoโ€ข
1 reply
sad-indigo

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
Was this page helpful?