plugins.Header.SimpleHeader.Menu.Menu.tsx Maven / Gradle / Ivy
The newest version!
import React from 'react'
import isEmpty from 'lodash/isEmpty'
import { metaPropsType } from '../../../utils'
import { Item as ItemProps } from '../../../CommonMenuTypes'
import { Item as ItemComponent } from './Item'
interface Props {
items: ItemProps[]
datasources?: metaPropsType[]
pathname: string
}
export function Menu({ pathname, datasources = [], items = [] }: Props) {
if (isEmpty(items)) {
return null
}
return items.map(item => (
))
}