Commit 6a4f067a authored by Will Hennessy's avatar Will Hennessy Committed by GitHub

Display message if not mainnet (#3151)

parent e9407bb6
import { Trans } from '@lingui/macro' import { Trans } from '@lingui/macro'
import { L2_CHAIN_IDS } from 'constants/chains' import { SupportedChainId } from 'constants/chains'
import useActiveWeb3React from 'hooks/useActiveWeb3React' import useActiveWeb3React from 'hooks/useActiveWeb3React'
import styled from 'styled-components/macro' import styled from 'styled-components/macro'
import { ThemedText } from 'theme' import { ThemedText } from 'theme'
...@@ -38,7 +38,7 @@ const EmptyState = ({ HeaderContent, SubHeaderContent }: EmptyStateProps) => ( ...@@ -38,7 +38,7 @@ const EmptyState = ({ HeaderContent, SubHeaderContent }: EmptyStateProps) => (
export default function ProposalEmptyState() { export default function ProposalEmptyState() {
const { chainId } = useActiveWeb3React() const { chainId } = useActiveWeb3React()
if (chainId && L2_CHAIN_IDS.includes(chainId)) { if (chainId && chainId !== SupportedChainId.MAINNET) {
return ( return (
<EmptyState <EmptyState
HeaderContent={() => <Trans>Please connect to Layer 1 Ethereum</Trans>} HeaderContent={() => <Trans>Please connect to Layer 1 Ethereum</Trans>}
......
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