Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
render() {
const { item } = this.props;
const isExpanded = this.state.open ? 'open' : '';
const Icon = item.icon ? Feather[item.icon] : null;
const ExpandIcon = this.state.open
? Feather.ChevronDown
: Feather.ChevronRight;
return (
<li>
<a role="button" href="#!">
{item.icon && Icon && }
<span>{item.name}</span>{' '}
{item.badge && (
)}
</a>
{(this.state.open || this.props.isSidebarCollapsed) && (
<ul>
{item.children.map((item, index) => (
))}</ul></li>