Commit 6b99740f authored by Jordan Frankfurt's avatar Jordan Frankfurt Committed by GitHub

use network-specific help center link (#2285)

parent f5557a43
...@@ -110,16 +110,18 @@ export function AddLiquidityNetworkAlert() { ...@@ -110,16 +110,18 @@ export function AddLiquidityNetworkAlert() {
return null return null
} }
const info = CHAIN_INFO[chainId as SupportedL2ChainId] const info = CHAIN_INFO[chainId as SupportedL2ChainId]
const depositUrl = [SupportedChainId.OPTIMISM, SupportedChainId.OPTIMISTIC_KOVAN].includes(chainId) const isOptimism = [SupportedChainId.OPTIMISM, SupportedChainId.OPTIMISTIC_KOVAN].includes(chainId)
? `${info.bridge}?chainId=1` const depositUrl = isOptimism ? `${info.bridge}?chainId=1` : info.bridge
: info.bridge const readMoreLink = isOptimism
? 'https://help.uniswap.org/en/articles/5392809-how-to-deposit-tokens-to-optimism'
: 'https://help.uniswap.org/en/articles/5538618-how-to-deposit-tokens-to-arbitrum'
return ( return (
<Wrapper darkMode={darkMode} chainId={chainId} logoUrl={info.logoUrl}> <Wrapper darkMode={darkMode} chainId={chainId} logoUrl={info.logoUrl}>
<L2Icon src={info.logoUrl} /> <L2Icon src={info.logoUrl} />
<Body> <Body>
<Trans>This is an alpha release of Uniswap on the {info.label} network.</Trans> <Trans>This is an alpha release of Uniswap on the {info.label} network.</Trans>
<DesktopTextBreak /> <Trans>You must bridge L1 assets to the network to use them.</Trans>{' '} <DesktopTextBreak /> <Trans>You must bridge L1 assets to the network to use them.</Trans>{' '}
<ReadMoreLink href="https://help.uniswap.org/en/articles/5392809-how-to-deposit-tokens-to-optimism"> <ReadMoreLink href={readMoreLink}>
<Trans>Read more</Trans> <Trans>Read more</Trans>
</ReadMoreLink> </ReadMoreLink>
</Body> </Body>
......
...@@ -110,16 +110,18 @@ export function MinimalNetworkAlert() { ...@@ -110,16 +110,18 @@ export function MinimalNetworkAlert() {
return null return null
} }
const info = CHAIN_INFO[chainId as SupportedL2ChainId] const info = CHAIN_INFO[chainId as SupportedL2ChainId]
const depositUrl = [SupportedChainId.OPTIMISM, SupportedChainId.OPTIMISTIC_KOVAN].includes(chainId) const isOptimism = [SupportedChainId.OPTIMISM, SupportedChainId.OPTIMISTIC_KOVAN].includes(chainId)
? `${info.bridge}?chainId=1` const depositUrl = isOptimism ? `${info.bridge}?chainId=1` : info.bridge
: info.bridge const readMoreLink = isOptimism
? 'https://help.uniswap.org/en/articles/5392809-how-to-deposit-tokens-to-optimism'
: 'https://help.uniswap.org/en/articles/5538618-how-to-deposit-tokens-to-arbitrum'
return ( return (
<Wrapper darkMode={darkMode} chainId={chainId} logoUrl={info.logoUrl}> <Wrapper darkMode={darkMode} chainId={chainId} logoUrl={info.logoUrl}>
<L2Icon src={info.logoUrl} /> <L2Icon src={info.logoUrl} />
<Body> <Body>
<Trans>This is an alpha release of Uniswap on the {info.label} network.</Trans> <Trans>This is an alpha release of Uniswap on the {info.label} network.</Trans>
<DesktopTextBreak /> <Trans>You must bridge L1 assets to the network to use them.</Trans>{' '} <DesktopTextBreak /> <Trans>You must bridge L1 assets to the network to use them.</Trans>{' '}
<ReadMoreLink href="https://help.uniswap.org/en/articles/5392809-how-to-deposit-tokens-to-optimism"> <ReadMoreLink href={readMoreLink}>
<Trans>Read more</Trans> <Trans>Read more</Trans>
</ReadMoreLink> </ReadMoreLink>
</Body> </Body>
......
...@@ -137,10 +137,11 @@ export function NetworkAlert() { ...@@ -137,10 +137,11 @@ export function NetworkAlert() {
return null return null
} }
const info = CHAIN_INFO[chainId as SupportedL2ChainId] const info = CHAIN_INFO[chainId as SupportedL2ChainId]
const depositUrl = [SupportedChainId.OPTIMISM, SupportedChainId.OPTIMISTIC_KOVAN].includes(chainId) const isOptimism = [SupportedChainId.OPTIMISM, SupportedChainId.OPTIMISTIC_KOVAN].includes(chainId)
? `${info.bridge}?chainId=1` const depositUrl = isOptimism ? `${info.bridge}?chainId=1` : info.bridge
: info.bridge const readMoreLink = isOptimism
? 'https://help.uniswap.org/en/articles/5392809-how-to-deposit-tokens-to-optimism'
: 'https://help.uniswap.org/en/articles/5538618-how-to-deposit-tokens-to-arbitrum'
return ( return (
<RootWrapper chainId={chainId} darkMode={darkMode} logoUrl={info.logoUrl}> <RootWrapper chainId={chainId} darkMode={darkMode} logoUrl={info.logoUrl}>
<CloseIcon onClick={dismiss} /> <CloseIcon onClick={dismiss} />
...@@ -154,7 +155,7 @@ export function NetworkAlert() { ...@@ -154,7 +155,7 @@ export function NetworkAlert() {
This is an alpha release of Uniswap on the {info.label} network. You must bridge L1 assets to the network to This is an alpha release of Uniswap on the {info.label} network. You must bridge L1 assets to the network to
swap them. swap them.
</Trans>{' '} </Trans>{' '}
<ReadMoreLink href="https://help.uniswap.org/en/articles/5392809-how-to-deposit-tokens-to-optimism"> <ReadMoreLink href={readMoreLink}>
<Trans>Read more</Trans> <Trans>Read more</Trans>
</ReadMoreLink> </ReadMoreLink>
</Body> </Body>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment