import React from 'react'; import PropTypes from 'prop-types'; import { withTranslation } from 'react-i18next'; import { GlobalNav, GlobalItem, } from '@atlaskit/navigation-next'; import { createSubscribedElement } from '../UnstatedUtils'; import AppContainer from '../../services/AppContainer'; class SidebarNav extends React.Component { static propTypes = { currentContentsId: PropTypes.string, onItemSelected: PropTypes.func, }; state = { }; itemSelectedHandler = (contentsId) => { const { onItemSelected } = this.props; if (onItemSelected != null) { onItemSelected(contentsId); } } generatePrimaryItemObj(id, label, icon) { const isSelected = this.props.currentContentsId === id; return { id, component: ({ className }) => (