import type { ComponentProps, ReactNode } from 'react'; import { DApp, NetworkSwitcher, TOKEN_GOVERNANCE, useEnvironment, useLinks, } 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, Icon, NavigationBreakpoint, NavigationTrigger, NavigationContent, } from '@vegaprotocol/ui-toolkit'; import { Links, Routes } from '../../pages/client-router'; import { createDocsLinks } from '@vegaprotocol/utils'; import { SettingsButton } from '../../client-pages/settings'; import { ProtocolUpgradeCountdown, ProtocolUpgradeCountdownMode, } from '@vegaprotocol/proposals'; export const Navbar = ({ theme = 'system', }: { theme: ComponentProps['theme']; }) => { const { VEGA_DOCS_URL, GITHUB_FEEDBACK_URL } = useEnvironment(); const tokenLink = useLinks(DApp.Token); const { marketId } = useGlobalStore((store) => ({ marketId: store.marketId, })); const tradingPath = marketId ? Links[Routes.MARKET](marketId) : Links[Routes.MARKET](); return ( } breakpoints={[521, 1122]} > {t('Markets')} {t('Trading')} {t('Portfolio')} {t('Governance')} {VEGA_DOCS_URL && GITHUB_FEEDBACK_URL && ( {t('Resources')} {t('Docs')} {t('Give Feedback')} )} ); }; const NavExternalLink = ({ children, href, }: { children: ReactNode; href: string; }) => { return ( {children} ); };