in src/components/Menu/Directory/index.tsx [75:101]
render() {
this.initialize();
if (this.itemsToDisplay.length === 0) {
return <></>;
}
return (
<div>
<DirectoryGroupHeaderStyle onClick={this.toggleOpen}>
<h4>{this.props.title}</h4>
<ArrowStyle isUp={this.state.isExpanded} />
</DirectoryGroupHeaderStyle>
{this.state.isExpanded && (
<DirectoryLinksStyle>
{this.itemsToDisplay.map((item) => (
<DirectoryGroupItemStyle
isActive={this.currentRoute.startsWith(item.route)}
key={item.title}
>
<InternalLink href={`${item.route}`}>{item.title}</InternalLink>
<br />
</DirectoryGroupItemStyle>
))}
</DirectoryLinksStyle>
)}
</div>
);
}