./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
You can use 'useSearchParams' to access the query parameters.In this page parameter 'q' has following value(s)
["aaa"]