Skip to content

Commit

Permalink
fix(ui): don't show members information in cloud
Browse files Browse the repository at this point in the history
  • Loading branch information
hoorayimhelping committed Nov 12, 2019
1 parent 291f7b3 commit bdbcad7
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 12 deletions.
25 changes: 14 additions & 11 deletions ui/src/pageLayout/containers/Nav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import CloudExclude from 'src/shared/components/cloud/CloudExclude'
import CloudOnly from 'src/shared/components/cloud/CloudOnly'

// Constants
import {HOMEPAGE_PATHNAME} from 'src/shared/constants'
import {CLOUD, HOMEPAGE_PATHNAME} from 'src/shared/constants'

// Utils
import {getNavItemActivation} from 'src/pageLayout/utils'
Expand Down Expand Up @@ -76,9 +76,10 @@ class SideNav extends PureComponent<Props, State> {
const tokensLink = `${orgPrefix}/load-data/tokens`
const clientLibrariesLink = `${orgPrefix}/load-data/client-libraries`
// Settings
const settingsLink = `${orgPrefix}/settings/members`
const membersLink = `${orgPrefix}/settings/members`
const variablesLink = `${orgPrefix}/settings/variables`
const settingsLink =
CLOUD === false ? `${orgPrefix}/settings/members` : variablesLink // don't show members link in cloud - go to variables instead
const templatesLink = `${orgPrefix}/settings/templates`
const labelsLink = `${orgPrefix}/settings/labels`
const profileLink = `${orgPrefix}/settings/profile`
Expand Down Expand Up @@ -253,15 +254,17 @@ class SideNav extends PureComponent<Props, State> {
)}
active={getNavItemActivation(['settings'], location.pathname)}
>
<NavMenu.SubItem
titleLink={className => (
<Link to={membersLink} className={className}>
Members
</Link>
)}
active={getNavItemActivation(['members'], location.pathname)}
key="members"
/>
<CloudExclude>
<NavMenu.SubItem
titleLink={className => (
<Link to={membersLink} className={className}>
Members
</Link>
)}
active={getNavItemActivation(['members'], location.pathname)}
key="members"
/>
</CloudExclude>
<NavMenu.SubItem
titleLink={className => (
<Link to={variablesLink} className={className}>
Expand Down
2 changes: 1 addition & 1 deletion ui/src/settings/components/SettingsNavigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class SettingsNavigation extends PureComponent<Props> {
{
text: 'Members',
id: 'members',
cloudExclude: false,
cloudExclude: true,
},
{
text: 'Variables',
Expand Down

0 comments on commit bdbcad7

Please sign in to comment.