-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #135 from CudoVentures/CUDOS-1322-expanded-left-me…
…nu-on-wider-screens expanded-left-menu-on-wider-screens
- Loading branch information
Showing
9 changed files
with
87 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import DashboardIcon from 'assets/vectors/dashboard.svg?component' | ||
import ProposalsIcon from 'assets/vectors/proposals.svg?component' | ||
import StakingIcon from 'assets/vectors/staking.svg?component' | ||
import FaucetIcon from 'assets/vectors/faucet.svg?component' | ||
import { CHAIN_DETAILS } from 'utils/constants' | ||
|
||
export interface MenuItems { | ||
icon: JSX.Element; | ||
link: string; | ||
text: string; | ||
} | ||
|
||
export const getMenuItems = (chosenNetwork: string, loadingState: boolean): MenuItems[] => { | ||
|
||
const MenuItems = [ | ||
{ icon: <DashboardIcon />, link: '/dashboard', text: 'Dashboard' }, | ||
{ icon: <StakingIcon />, link: '/staking', text: 'Staking' }, | ||
{ icon: <ProposalsIcon />, link: '/proposals', text: 'Proposals' }, | ||
] | ||
|
||
if (CHAIN_DETAILS.CHAIN_ID[chosenNetwork! as keyof typeof CHAIN_DETAILS.CHAIN_ID] | ||
!== CHAIN_DETAILS.CHAIN_ID.MAINNET && !loadingState) { | ||
MenuItems.push({ icon: <FaucetIcon />, link: '/faucet', text: 'Faucet' }) | ||
} | ||
|
||
return MenuItems | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters