Routing
./routes/invoices.tsx
./routes/invoices/$invoiceId.tsx
./routes/invoices/$invoiceId/activity.tsx
./routes/invoices/$invoiceId/activity/$activityId.tsx
All these routes will be matched to the same hierarchy that ends with $activity.tsxBut not the following because $activity.tsx has siblings whose file names matches exaclty with the route leaf(all, latest).You can access router parameters using "useParams". So in this page:

invoiceId is something

activityId is something-else