How do I add in between crumbs ?
udielenberg opened this issue · 2 comments
udielenberg commented
Hey!
I currently work with { disabledDefaults: true }
.
this is a route I have:
const routes = [
{
path: '/p/:projectId/environments/:environmentId' ,
breadcrumb: ({ match }) => { ... return <span>{match.params[...]}</span>} },
...
]
Is there a way I could get this breadcrumb ${projectId} > Environments > ${environmentId}
icd2k3 commented
@udielenberg yes that is possible. projectId
and environmentId
will both be in the match
object. So, you could do something like this:
const routes = [
{
path: '/p/:projectId/environments/:environmentId',
breadcrumb: ({ match }) => (
<span>
{match.params.projectId} > Environments > {match.params.environmentId}
</span>
),
}
]
udielenberg commented