Commit 4b92d80b authored by Zhongjie Wu's avatar Zhongjie Wu Committed by ι™ˆεΈ…

Make "home" optional in breadcrumb (#3416)

parent 007c5c2c
......@@ -100,7 +100,8 @@ export default class BreadcrumbView extends PureComponent {
</Breadcrumb.Item>
) : null;
});
// Add home breadcrumbs to your head
// Add home breadcrumbs to your head if defined
if (home) {
extraBreadcrumbItems.unshift(
<Breadcrumb.Item key="home">
{createElement(
......@@ -108,10 +109,11 @@ export default class BreadcrumbView extends PureComponent {
{
[linkElement === 'a' ? 'href' : 'to']: '/',
},
home || 'Home'
home
)}
</Breadcrumb.Item>
);
}
return (
<Breadcrumb className={styles.breadcrumb} separator={breadcrumbSeparator}>
{extraBreadcrumbItems}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment