Skip to content

Commit

Permalink
Removed unnecessary link from kb breadcrumb
Browse files Browse the repository at this point in the history
  • Loading branch information
Buyantogtokh committed Jun 8, 2019
1 parent a740a5b commit d185477
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions src/modules/knowledgeBase/components/KnowledgeBase.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,23 @@ class KnowledgeBase extends React.Component<Props> {
firstTopic: { title: '' }
};
const currentKnowledgeBase = currentCategory.firstTopic || { title: '' };
const list = [{ title: __('Knowledge base'), link: '/knowledgeBase' }];

return [
{ title: __('Knowledge base'), link: '/knowledgeBase' },
{ title: `${currentKnowledgeBase.title || 'No Category'}` },
{ title: `${currentCategory.title || ''}` }
];
if (currentKnowledgeBase.title) {
list.push({
title: currentKnowledgeBase.title,
link: '#'
});
}

if (currentCategory.title) {
list.push({
title: currentCategory.title,
link: '#'
});
}

return list;
}

render() {
Expand Down

0 comments on commit d185477

Please sign in to comment.