fix(trading): fix docs resources (#3382)

This commit is contained in:
m.ray 2023-04-06 07:53:08 -04:00 committed by GitHub
parent 8d4e4a1228
commit 2a2af3ba9c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View File

@ -23,6 +23,7 @@ import {
} from '@vegaprotocol/ui-toolkit'; } from '@vegaprotocol/ui-toolkit';
import { Links, Routes } from '../../pages/client-router'; import { Links, Routes } from '../../pages/client-router';
import { createDocsLinks } from '@vegaprotocol/utils';
export const Navbar = ({ export const Navbar = ({
theme = 'system', theme = 'system',
@ -37,6 +38,7 @@ export const Navbar = ({
const tradingPath = marketId const tradingPath = marketId
? Links[Routes.MARKET](marketId) ? Links[Routes.MARKET](marketId)
: Links[Routes.MARKET](); : Links[Routes.MARKET]();
return ( return (
<Navigation <Navigation
appName="Console" appName="Console"
@ -89,7 +91,9 @@ export const Navbar = ({
<NavigationContent> <NavigationContent>
<NavigationList> <NavigationList>
<NavigationItem> <NavigationItem>
<NavExternalLink href={VEGA_DOCS_URL}> <NavExternalLink
href={createDocsLinks(VEGA_DOCS_URL).NEW_TO_VEGA}
>
{t('Docs')} {t('Docs')}
</NavExternalLink> </NavExternalLink>
</NavigationItem> </NavigationItem>

View File

@ -3,6 +3,7 @@
*/ */
export const createDocsLinks = (docsUrl: string) => ({ export const createDocsLinks = (docsUrl: string) => ({
NEW_TO_VEGA: `${docsUrl}/concepts/new-to-vega`,
AUCTION_TYPE_OPENING: `${docsUrl}/concepts/trading-on-vega/trading-modes#auction-type-opening`, AUCTION_TYPE_OPENING: `${docsUrl}/concepts/trading-on-vega/trading-modes#auction-type-opening`,
AUCTION_TYPE_LIQUIDITY_MONITORING: `${docsUrl}/concepts/trading-on-vega/trading-modes#auction-type-liquidity-monitoring`, AUCTION_TYPE_LIQUIDITY_MONITORING: `${docsUrl}/concepts/trading-on-vega/trading-modes#auction-type-liquidity-monitoring`,
AUCTION_TYPE_PRICE_MONITORING: `${docsUrl}/concepts/trading-on-vega/trading-modes#auction-type-price-monitoring`, AUCTION_TYPE_PRICE_MONITORING: `${docsUrl}/concepts/trading-on-vega/trading-modes#auction-type-price-monitoring`,