T
TanStack5mo ago
rival-black

Parent route not set correctly?

I'm confused. Having
- Routes
-- expeditions
-- index.tsx
-- $expeditionId
- Routes
-- expeditions
-- index.tsx
-- $expeditionId
both the route /expeditions and /expeditions/$expeditionId will have root as parentRoute. but if I were to move index.tsx up one directory such as
- Routes
-- expeditions.tsx
-- expeditions
-- $expeditionId
- Routes
-- expeditions.tsx
-- expeditions
-- $expeditionId
Then $expeditions/$expeditionId will have /expeditions as parent route (which is what I would want in both cases). Have I misunderstood how this works or is this a bug?
1 Reply
sensitive-blue
sensitive-blue5mo ago
is this missing some indentation? ideally please provide a complete example by forking one of the existing router examples on stackblitz

Did you find this page helpful?