Skip to content
This repository has been archived by the owner on Jun 24, 2022. It is now read-only.

Commit

Permalink
use network-specific help center link (#2285)
Browse files Browse the repository at this point in the history
  • Loading branch information
JFrankfurt authored Sep 1, 2021
1 parent f5557a4 commit 6b99740
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 13 deletions.
10 changes: 6 additions & 4 deletions src/components/NetworkAlert/AddLiquidityNetworkAlert.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -110,16 +110,18 @@ export function AddLiquidityNetworkAlert() {
return null
}
const info = CHAIN_INFO[chainId as SupportedL2ChainId]
const depositUrl = [SupportedChainId.OPTIMISM, SupportedChainId.OPTIMISTIC_KOVAN].includes(chainId)
? `${info.bridge}?chainId=1`
: info.bridge
const isOptimism = [SupportedChainId.OPTIMISM, SupportedChainId.OPTIMISTIC_KOVAN].includes(chainId)
const depositUrl = isOptimism ? `${info.bridge}?chainId=1` : 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 (
<Wrapper darkMode={darkMode} chainId={chainId} logoUrl={info.logoUrl}>
<L2Icon src={info.logoUrl} />
<Body>
<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>{' '}
<ReadMoreLink href="https://help.uniswap.org/en/articles/5392809-how-to-deposit-tokens-to-optimism">
<ReadMoreLink href={readMoreLink}>
<Trans>Read more</Trans>
</ReadMoreLink>
</Body>
Expand Down
10 changes: 6 additions & 4 deletions src/components/NetworkAlert/MinimalNetworkAlert.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -110,16 +110,18 @@ export function MinimalNetworkAlert() {
return null
}
const info = CHAIN_INFO[chainId as SupportedL2ChainId]
const depositUrl = [SupportedChainId.OPTIMISM, SupportedChainId.OPTIMISTIC_KOVAN].includes(chainId)
? `${info.bridge}?chainId=1`
: info.bridge
const isOptimism = [SupportedChainId.OPTIMISM, SupportedChainId.OPTIMISTIC_KOVAN].includes(chainId)
const depositUrl = isOptimism ? `${info.bridge}?chainId=1` : 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 (
<Wrapper darkMode={darkMode} chainId={chainId} logoUrl={info.logoUrl}>
<L2Icon src={info.logoUrl} />
<Body>
<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>{' '}
<ReadMoreLink href="https://help.uniswap.org/en/articles/5392809-how-to-deposit-tokens-to-optimism">
<ReadMoreLink href={readMoreLink}>
<Trans>Read more</Trans>
</ReadMoreLink>
</Body>
Expand Down
11 changes: 6 additions & 5 deletions src/components/NetworkAlert/NetworkAlert.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,11 @@ export function NetworkAlert() {
return null
}
const info = CHAIN_INFO[chainId as SupportedL2ChainId]
const depositUrl = [SupportedChainId.OPTIMISM, SupportedChainId.OPTIMISTIC_KOVAN].includes(chainId)
? `${info.bridge}?chainId=1`
: info.bridge

const isOptimism = [SupportedChainId.OPTIMISM, SupportedChainId.OPTIMISTIC_KOVAN].includes(chainId)
const depositUrl = isOptimism ? `${info.bridge}?chainId=1` : 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 (
<RootWrapper chainId={chainId} darkMode={darkMode} logoUrl={info.logoUrl}>
<CloseIcon onClick={dismiss} />
Expand All @@ -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
swap them.
</Trans>{' '}
<ReadMoreLink href="https://help.uniswap.org/en/articles/5392809-how-to-deposit-tokens-to-optimism">
<ReadMoreLink href={readMoreLink}>
<Trans>Read more</Trans>
</ReadMoreLink>
</Body>
Expand Down

0 comments on commit 6b99740

Please sign in to comment.