From 6b99740f91b8d242a0741f5cd36030e86bd3cc5f Mon Sep 17 00:00:00 2001 From: Jordan Frankfurt Date: Wed, 1 Sep 2021 16:01:24 -0400 Subject: [PATCH] use network-specific help center link (#2285) --- .../NetworkAlert/AddLiquidityNetworkAlert.tsx | 10 ++++++---- src/components/NetworkAlert/MinimalNetworkAlert.tsx | 10 ++++++---- src/components/NetworkAlert/NetworkAlert.tsx | 11 ++++++----- 3 files changed, 18 insertions(+), 13 deletions(-) diff --git a/src/components/NetworkAlert/AddLiquidityNetworkAlert.tsx b/src/components/NetworkAlert/AddLiquidityNetworkAlert.tsx index 002fccb7c..67d49e28c 100644 --- a/src/components/NetworkAlert/AddLiquidityNetworkAlert.tsx +++ b/src/components/NetworkAlert/AddLiquidityNetworkAlert.tsx @@ -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 ( This is an alpha release of Uniswap on the {info.label} network. You must bridge L1 assets to the network to use them.{' '} - + Read more diff --git a/src/components/NetworkAlert/MinimalNetworkAlert.tsx b/src/components/NetworkAlert/MinimalNetworkAlert.tsx index 8fac69e64..4a0e7eeb1 100644 --- a/src/components/NetworkAlert/MinimalNetworkAlert.tsx +++ b/src/components/NetworkAlert/MinimalNetworkAlert.tsx @@ -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 ( This is an alpha release of Uniswap on the {info.label} network. You must bridge L1 assets to the network to use them.{' '} - + Read more diff --git a/src/components/NetworkAlert/NetworkAlert.tsx b/src/components/NetworkAlert/NetworkAlert.tsx index c8ce9156c..f88e1ec72 100644 --- a/src/components/NetworkAlert/NetworkAlert.tsx +++ b/src/components/NetworkAlert/NetworkAlert.tsx @@ -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 ( @@ -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. {' '} - + Read more