Exclude links that don't work in cloud
parent
0b1b566aac
commit
cc2c826be6
|
@ -4,10 +4,6 @@ import {Link} from 'react-router'
|
|||
import classnames from 'classnames'
|
||||
import {get} from 'lodash'
|
||||
|
||||
// Components
|
||||
import NavMenuSubItem from 'src/pageLayout/components/NavMenuSubItem'
|
||||
import {Select} from 'src/clockface'
|
||||
|
||||
// Types
|
||||
import {IconFont} from 'src/clockface'
|
||||
|
||||
|
@ -43,7 +39,7 @@ const NavMenuItem: SFC<Props> = ({
|
|||
<Link className="nav--item-header" to={link}>
|
||||
{title}
|
||||
</Link>
|
||||
<Select type={NavMenuSubItem}>{children}</Select>
|
||||
{children}
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
|
|
|
@ -12,6 +12,7 @@ import {AppState} from 'src/types'
|
|||
import {IconFont} from 'src/clockface'
|
||||
|
||||
import {ErrorHandling} from 'src/shared/decorators/errors'
|
||||
import CloudExclude from 'src/shared/components/cloud/CloudExclude'
|
||||
|
||||
interface OwnProps {
|
||||
isHidden: boolean
|
||||
|
@ -80,6 +81,7 @@ class SideNav extends PureComponent<Props> {
|
|||
location={location.pathname}
|
||||
highlightPaths={['configuration']}
|
||||
>
|
||||
<CloudExclude>
|
||||
<NavMenu.SubItem
|
||||
title="Buckets"
|
||||
link="/configuration/buckets_tab"
|
||||
|
@ -104,6 +106,7 @@ class SideNav extends PureComponent<Props> {
|
|||
location={location.pathname}
|
||||
highlightPaths={['variables_tab']}
|
||||
/>
|
||||
</CloudExclude>
|
||||
<NavMenu.SubItem
|
||||
title="Profile"
|
||||
link="/configuration/settings_tab"
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
import {PureComponent} from 'react'
|
||||
|
||||
export default class extends PureComponent {
|
||||
render() {
|
||||
const {children} = this.props
|
||||
|
||||
if (process.env.CLOUD !== 'true') {
|
||||
return children
|
||||
}
|
||||
|
||||
return null
|
||||
}
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
import {PureComponent} from 'react'
|
||||
|
||||
export default class extends PureComponent {
|
||||
render() {
|
||||
const {children} = this.props
|
||||
|
||||
if (process.env.CLOUD === 'true') {
|
||||
return children
|
||||
}
|
||||
|
||||
return null
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue