import { Menu } from "antd";
import { isInRole } from './PrivateContent'

export const PrivateMenuItem = ({ children, roles, ...other }) => {
  if(!isInRole(roles))
    return null

  return <Menu.Item {...other}>
      {children}
    </Menu.Item>;
}
