Skip to content

Commit e4d28d0

Browse files
committed
feat: add sunset banner for Zero Mainnet
1 parent df17ace commit e4d28d0

2 files changed

Lines changed: 22 additions & 0 deletions

File tree

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import deprecatedStyled from 'lib/styled-components'
2+
3+
const StyledParagraph = deprecatedStyled.p`
4+
padding: 16px;
5+
border-radius: 16px;
6+
font-size: 1.1em;
7+
background-color: ${({ theme }) => theme.critical2};
8+
`
9+
10+
export function DeprecationWarningBanner() {
11+
return (
12+
<StyledParagraph>
13+
Support for Zero Mainnet will be available until July 31st. Read more at:{' '}
14+
<a href="https://x.com/zerodotnetwork/status/2057529610628128917">
15+
https://x.com/zerodotnetwork/status/205...917
16+
</a>
17+
</StyledParagraph>
18+
)
19+
}

apps/web/src/pages/Swap/index.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import { useIsMobile, useScreenSize } from 'hooks/screenSize'
1010
import { useAccount } from 'hooks/useAccount'
1111
import { useTheme } from 'lib/styled-components'
1212
import { BuyForm } from 'pages/Swap/Buy/BuyForm'
13+
import { DeprecationWarningBanner } from 'pages/Swap/DeprecationWarningBanner'
1314
import { LimitFormWrapper } from 'pages/Swap/Limit/LimitForm'
1415
import { SendForm } from 'pages/Swap/Send/SendForm'
1516
import { SwapForm } from 'pages/Swap/SwapForm'
@@ -136,6 +137,7 @@ export function Swap({
136137
const isDark = useIsDarkMode()
137138
const screenSize = useScreenSize()
138139
const forAggregatorEnabled = useFeatureFlag(FeatureFlags.ForAggregator)
140+
const zeroChainId = '543210'
139141

140142
return (
141143
<SwapAndLimitContextProvider
@@ -155,6 +157,7 @@ export function Swap({
155157
<Flex width="100%">
156158
<SwapWrapper isDark={isDark} className={className} id="swap-page">
157159
{!hideHeader && <SwapHeader compact={compact || !screenSize.sm} syncTabToUrl={syncTabToUrl} />}
160+
{zeroChainId === chainId?.toString() && <DeprecationWarningBanner />}
158161
{currentTab === SwapTab.Swap && (
159162
<SwapForm
160163
onCurrencyChange={onCurrencyChange}

0 commit comments

Comments
 (0)