TanStackT
TanStack6mo ago
2 replies
slow-yellow

Is it possible to create a type of a subset of the routes for LinkOptions?

Lets say we have these routes
/inbox
/inbox/$emailId
/clients
/clients/$clientUuid
/clients/$clientUuid/inbox
/clients/$clientUuid/inbox/$emailId

inside inbox im rendering an email card component, this card has multiple links inside.
whether im rendering this component inside /inbox i want the links to go to /inbox/$emailId
and when im in /clients/$clientUuid/inbox i want the link to go to /clients/$clientUuid/inbox/$emailId
so i want to pass in props like LinkOptions but only for these routes, and when im in the client inbox it should highlight that i should add the clientUuid prop
Was this page helpful?