import type { ComponentProps, ReactNode } from 'react'; import { DApp, NetworkSwitcher, TOKEN_GOVERNANCE, useEnvironment, useLinks, DocsLinks, } from '@vegaprotocol/environment'; import { t } from '@vegaprotocol/i18n'; import { useGlobalStore } from '../../stores'; import { VegaWalletConnectButton } from '../vega-wallet-connect-button'; import { Navigation, NavigationList, NavigationItem, NavigationLink, ExternalLink, NavigationBreakpoint, NavigationTrigger, NavigationContent, VegaIconNames, VegaIcon, } from '@vegaprotocol/ui-toolkit'; import { Links, Routes } from '../../pages/client-router'; import { ProtocolUpgradeCountdown, ProtocolUpgradeCountdownMode, } from '@vegaprotocol/proposals'; export const Navbar = ({ theme = 'system', }: { theme: ComponentProps['theme']; }) => { const { GITHUB_FEEDBACK_URL } = useEnvironment(); const tokenLink = useLinks(DApp.Token); const marketId = useGlobalStore((store) => store.marketId); const tradingPath = marketId ? Links[Routes.MARKET](marketId) : Links[Routes.MARKET](); return ( } breakpoints={[521, 1122]} > {t('Markets')} {t('Trading')} {t('Portfolio')} {t('Governance')} {DocsLinks?.NEW_TO_VEGA && GITHUB_FEEDBACK_URL && ( {t('Resources')} {t('Docs')} {t('Give Feedback')} {t('Disclaimer')} )} ); }; const NavExternalLink = ({ children, href, }: { children: ReactNode; href: string; }) => { return ( {children} ); };