Skip to content

Commit

Permalink
fix: breadcrumbItem rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
jeroenreijs committed Mar 31, 2020
1 parent 014dac5 commit 9ee28d1
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/components/breadcrumbItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,17 @@
orientation: 'VERTICAL',
jsx: (() => {
const isDev = B.env === 'dev';
const { Link } = B;
const { Link, useText } = B;
const { endpoint, breadcrumbContent } = options;
const breadcrumbItem = <Link endpoint={endpoint}>{breadcrumbContent}</Link>;

const content = isDev
? breadcrumbContent.join(' ')
: useText(breadcrumbContent);

// eslint-disable-next-line jsx-a11y/anchor-is-valid
const breadcrumbItem = <Link endpoint={endpoint}>{content}</Link>;

return isDev ? <div>{breadcrumbItem}</div> : breadcrumbItem;
})(),
styles: {},
styles: () => () => ({}),
}))();

0 comments on commit 9ee28d1

Please sign in to comment.