Skip to content

Commit

Permalink
Hide link to portfolio behind debug flag
Browse files Browse the repository at this point in the history
  • Loading branch information
sophialittlejohn committed Sep 25, 2023
1 parent 8814cf2 commit 9bdfaea
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions centrifuge-app/src/components/Menu/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { config } from '../../config'
import { useAddress } from '../../utils/useAddress'
import { useIsAboveBreakpoint } from '../../utils/useIsAboveBreakpoint'
import { usePoolsThatAnyConnectedAddressHasPermissionsFor } from '../../utils/usePermissions'
import { useDebugFlags } from '../DebugFlags'
import { RouterLinkButton } from '../RouterLinkButton'
import { GovernanceMenu } from './GovernanceMenu'
import { IssuerMenu } from './IssuerMenu'
Expand All @@ -21,7 +22,9 @@ import { PoolLink } from './PoolLink'
export function Menu() {
const pools = usePoolsThatAnyConnectedAddressHasPermissionsFor() || []
const isLarge = useIsAboveBreakpoint('L')
const isXLarge = useIsAboveBreakpoint('XL')
const address = useAddress('substrate')
const { showPortfolio } = useDebugFlags()

return (
<Shelf
Expand All @@ -45,10 +48,12 @@ export function Menu() {

<GovernanceMenu />

<PageLink to="/portfolio" stacked={!isXLarge}>
<IconPieChart />
Portfolio
</PageLink>
{showPortfolio && (
<PageLink to="/portfolio" stacked={!isXLarge}>
<IconPieChart />
Portfolio
</PageLink>
)}

{(pools.length > 0 || config.poolCreationType === 'immediate') && (
<IssuerMenu defaultOpen={isLarge} stacked={!isLarge}>
Expand Down

0 comments on commit 9bdfaea

Please sign in to comment.