Skip to content

Commit 6afa379

Browse files
committed
Fix undocumented links logic (make it generic)
1 parent 76dfa96 commit 6afa379

File tree

1 file changed

+2
-3
lines changed
  • uilib-docs/src/components/navbar

1 file changed

+2
-3
lines changed

uilib-docs/src/components/navbar/item.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,16 @@ import Link from 'gatsby-link';
33
import _ from 'lodash';
44
import classnames from 'classnames';
55

6-
const undocumentedGroups = ['Incubator'];
7-
86
export default ({id, link, components, currentPage}) => {
97
const hasChildren = _.size(components) > 1;
108

119
if (!hasChildren) {
1210
return <ItemEntry id={id} link={link} currentPage={currentPage} />;
1311
} else {
12+
const isUndocumented = _.isUndefined(_.find(components, {node: {displayName: id}}));
1413
return (
1514
<li key={id}>
16-
{undocumentedGroups.includes(id) ? (
15+
{isUndocumented ? (
1716
<span className={classnames('entry', {selected: id === currentPage})}>{id}</span>
1817
) : (
1918
<Link key={id} to={`/docs/${id}/`}>

0 commit comments

Comments
 (0)