Skip to content

Commit

Permalink
Readd components
Browse files Browse the repository at this point in the history
  • Loading branch information
kattylucy committed Jan 27, 2025
1 parent d3c5f7c commit 8eb7e8b
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions centrifuge-app/src/components/Menu/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ import {
IconPlus,
IconSwitch,
IconWallet,
MenuItemGroup,
Shelf,
Stack,
} from '@centrifuge/fabric'
import styled, { useTheme } from 'styled-components'
import { config } from '../../config'
Expand All @@ -19,7 +21,10 @@ import { useDebugFlags } from '../DebugFlags'
import { RouterLinkButton } from '../RouterLinkButton'
import { DashboardMenu } from './DashboardMenu'
import { GovernanceMenu } from './GovernanceMenu'
import { IssuerMenu } from './IssuerMenu'
import { NavManagementMenu } from './NavManagementMenu'
import { PageLink } from './PageLink'
import { PoolLink } from './PoolLink'

const COLOR = '#7C8085'

Expand Down Expand Up @@ -97,6 +102,43 @@ export function Menu() {
<GovernanceMenu />
</Box>

{(pools.length > 0 || config.poolCreationType === 'immediate') && !showDashboard && (
<IssuerMenu defaultOpen={isLarge} stacked={!isLarge}>
{isLarge ? (
<Stack as="ul" gap={1}>
{pools.map((pool) => (
<Box key={pool.id} as="li" pl={4}>
<PoolLink pool={pool} />
</Box>
))}
{address && config.poolCreationType === 'immediate' && (
<Shelf justifyContent="center" as="li" mt={1}>
<CreatePool />
</Shelf>
)}
</Stack>
) : (
<Stack as="ul" gap={1}>
{!!pools.length &&
pools.map((pool) => (
<MenuItemGroup key={pool.id}>
<Box px={2} py={1}>
<PoolLink pool={pool} />
</Box>
</MenuItemGroup>
))}
{address && config.poolCreationType === 'immediate' && (
<Box px={2} py={1}>
<CreatePool />
</Box>
)}
</Stack>
)}
</IssuerMenu>
)}

{!showDashboard && <NavManagementMenu stacked={!isLarge} />}

{config.network !== 'centrifuge' && (
<PageLink to="/nfts" stacked={!isLarge}>
<IconNft size={['iconMedium', 'iconMedium', 'iconSmall']} />
Expand Down

0 comments on commit 8eb7e8b

Please sign in to comment.