|
|
@ -61,20 +61,22 @@ const conversionFromLocation = (routerLocation, breadcrumbNameMap, props) => { |
|
|
// Convert the url to an array
|
|
|
// Convert the url to an array
|
|
|
const pathSnippets = urlToList(routerLocation.pathname); |
|
|
const pathSnippets = urlToList(routerLocation.pathname); |
|
|
// Loop data mosaic routing
|
|
|
// Loop data mosaic routing
|
|
|
const extraBreadcrumbItems = pathSnippets.map(url => { |
|
|
const extraBreadcrumbItems = pathSnippets |
|
|
const currentBreadcrumb = getBreadcrumb(breadcrumbNameMap, url); |
|
|
.map(url => { |
|
|
if (currentBreadcrumb.inherited) { |
|
|
const currentBreadcrumb = getBreadcrumb(breadcrumbNameMap, url); |
|
|
return null; |
|
|
if (currentBreadcrumb.inherited) { |
|
|
} |
|
|
return null; |
|
|
const name = renderItemLocal(currentBreadcrumb); |
|
|
} |
|
|
const { hideInBreadcrumb } = currentBreadcrumb; |
|
|
const name = renderItemLocal(currentBreadcrumb); |
|
|
return name && !hideInBreadcrumb |
|
|
const { hideInBreadcrumb } = currentBreadcrumb; |
|
|
? { |
|
|
return name && !hideInBreadcrumb |
|
|
path: url, |
|
|
? { |
|
|
breadcrumbName: name, |
|
|
path: url, |
|
|
} |
|
|
breadcrumbName: name, |
|
|
: null; |
|
|
} |
|
|
}); |
|
|
: null; |
|
|
|
|
|
}) |
|
|
|
|
|
.filter(item => item !== null); |
|
|
// Add home breadcrumbs to your head if defined
|
|
|
// Add home breadcrumbs to your head if defined
|
|
|
if (home) { |
|
|
if (home) { |
|
|
extraBreadcrumbItems.unshift({ |
|
|
extraBreadcrumbItems.unshift({ |
|
|
|