Skip to content

Commit 14a622e

Browse files
committed
refactor: rename MessageWrapper to PoolAlertMessage and update usage in usePoolAlert hook
1 parent d9d755e commit 14a622e

File tree

2 files changed

+26
-26
lines changed

2 files changed

+26
-26
lines changed

apps/main/src/dex/components/pool-alert-messages.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { SizesAndSpaces } from '@ui-kit/themes/design/1_sizes_spaces'
77

88
const { Spacing } = SizesAndSpaces
99

10-
export const MessageWrapper = ({ children }: { children: React.ReactNode }) => (
10+
export const PoolAlertMessage = ({ children }: { children: React.ReactNode }) => (
1111
<Stack
1212
alignItems="flex-start"
1313
spacing={Spacing.sm}

apps/main/src/dex/hooks/usePoolAlert.tsx

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { PoolAlert, PoolData, PoolDataCache, type UrlParams } from '@/dex/types/
44
import { useParams } from '@ui-kit/hooks/router'
55
import { t, Trans } from '@ui-kit/lib/i18n'
66
import { getInternalUrl } from '@ui-kit/shared/routes'
7-
import { ExternalLink, InternalLink, MessageWrapper } from '../components/pool-alert-messages'
7+
import { ExternalLink, InternalLink, PoolAlertMessage } from '../components/pool-alert-messages'
88

99
const usePoolAlert = (poolData?: PoolData | PoolDataCache) => {
1010
const params = useParams<UrlParams>()
@@ -26,9 +26,9 @@ const usePoolAlert = (poolData?: PoolData | PoolDataCache) => {
2626
},
2727
/* TODO: use Typography component instead of p tag */
2828
message: (
29-
<MessageWrapper>
29+
<PoolAlertMessage>
3030
<p>{t`Deposit disabled.`}</p>
31-
</MessageWrapper>
31+
</PoolAlertMessage>
3232
),
3333
})
3434
const geistFinanceAlert = (): PoolAlert => ({
@@ -43,9 +43,9 @@ const usePoolAlert = (poolData?: PoolData | PoolDataCache) => {
4343
learnMoreUrl: 'https://twitter.com/geistfinance',
4444
},
4545
message: (
46-
<MessageWrapper>
46+
<PoolAlertMessage>
4747
<p>{t`This pool is in withdraw only mode.`}</p>
48-
</MessageWrapper>
48+
</PoolAlertMessage>
4949
),
5050
})
5151
const yPrismaAlert = (): PoolAlert => {
@@ -60,9 +60,9 @@ const usePoolAlert = (poolData?: PoolData | PoolDataCache) => {
6060
isCloseOnTooltipOnly: true,
6161
alertType: 'warning',
6262
message: (
63-
<MessageWrapper>
63+
<PoolAlertMessage>
6464
<p>{t`Deposit disabled.`}</p>
65-
</MessageWrapper>
65+
</PoolAlertMessage>
6666
),
6767
banner: {
6868
title: t`Deprecated Pool`,
@@ -86,7 +86,7 @@ const usePoolAlert = (poolData?: PoolData | PoolDataCache) => {
8686
learnMoreUrl: 'https://gov.curve.finance/t/kill-gauges-on-all-non-susd-curve-pools-on-ethereum/10033/2',
8787
},
8888
message: (
89-
<MessageWrapper>
89+
<PoolAlertMessage>
9090
<p>
9191
<Trans>
9292
Please note that exchanges on synthetix synths are expected to be disabled and users can either withdraw
@@ -108,7 +108,7 @@ const usePoolAlert = (poolData?: PoolData | PoolDataCache) => {
108108
Please note that sUSD is not involved, so these would be on the other pools sETH, sBTC, sForex ...
109109
</Trans>
110110
</p>
111-
</MessageWrapper>
111+
</PoolAlertMessage>
112112
),
113113
})
114114
const ironbankAlert = (): PoolAlert => ({
@@ -120,9 +120,9 @@ const usePoolAlert = (poolData?: PoolData | PoolDataCache) => {
120120
subtitle: t`The Ironbank protocol is deprecated. Please do not supply liquidity to this pool.`,
121121
},
122122
message: (
123-
<MessageWrapper>
123+
<PoolAlertMessage>
124124
<p>{t`Deposit disabled.`}</p>
125-
</MessageWrapper>
125+
</PoolAlertMessage>
126126
),
127127
})
128128
const synthetixUsdAlert = (): PoolAlert => ({
@@ -137,9 +137,9 @@ const usePoolAlert = (poolData?: PoolData | PoolDataCache) => {
137137
learnMoreUrl: 'https://x.com/synthetix_io/status/1953054538610688198',
138138
},
139139
message: (
140-
<MessageWrapper>
140+
<PoolAlertMessage>
141141
<p>{t`This pool is in withdraw only mode.`}</p>
142-
</MessageWrapper>
142+
</PoolAlertMessage>
143143
),
144144
})
145145
const yieldbasisAlert = (): PoolAlert => ({
@@ -157,13 +157,13 @@ const usePoolAlert = (poolData?: PoolData | PoolDataCache) => {
157157
learnMoreUrl: 'https://yieldbasis.com',
158158
},
159159
message: (
160-
<MessageWrapper>
160+
<PoolAlertMessage>
161161
<p>
162162
<Trans>
163163
Deposit on <ExternalLink href="https://yieldbasis.com">yieldbasis.com</ExternalLink>
164164
</Trans>
165165
</p>
166-
</MessageWrapper>
166+
</PoolAlertMessage>
167167
),
168168
})
169169

@@ -177,9 +177,9 @@ const usePoolAlert = (poolData?: PoolData | PoolDataCache) => {
177177
subtitle: t`USPD has been exploited. This pool has been disabled to prevent new users from loss of funds.`,
178178
},
179179
message: (
180-
<MessageWrapper>
180+
<PoolAlertMessage>
181181
<p>{t`Deposit disabled. We recommend exiting this pool.`}</p>
182-
</MessageWrapper>
182+
</PoolAlertMessage>
183183
),
184184
})
185185

@@ -189,14 +189,14 @@ const usePoolAlert = (poolData?: PoolData | PoolDataCache) => {
189189
isCloseOnTooltipOnly: true,
190190
isInformationOnlyAndShowInForm: true,
191191
message: (
192-
<MessageWrapper>
192+
<PoolAlertMessage>
193193
<p>
194194
<Trans>
195195
Deposit and Swap with wBTC.e will return an error due to an Aave community decision to freeze this asset.{' '}
196196
<ExternalLink href="https://app.aave.com/governance/v3/proposal/?proposalId=2">More details</ExternalLink>
197197
</Trans>
198198
</p>
199-
</MessageWrapper>
199+
</PoolAlertMessage>
200200
),
201201
})
202202

@@ -212,9 +212,9 @@ const usePoolAlert = (poolData?: PoolData | PoolDataCache) => {
212212
learnMoreUrl: 'https://hackmd.io/@LlamaRisk/BJzSKHNjn',
213213
},
214214
message: (
215-
<MessageWrapper>
215+
<PoolAlertMessage>
216216
<p>{t`Deposit disabled. We recommend exiting this pool.`}</p>
217-
</MessageWrapper>
217+
</PoolAlertMessage>
218218
),
219219
})
220220

@@ -229,9 +229,9 @@ const usePoolAlert = (poolData?: PoolData | PoolDataCache) => {
229229
learnMoreUrl: 'https://twitter.com/CurveFinance/status/1685925429041917952',
230230
},
231231
message: (
232-
<MessageWrapper>
232+
<PoolAlertMessage>
233233
<p>{t`Deposit disabled. We recommend exiting this pool.`}</p>
234-
</MessageWrapper>
234+
</PoolAlertMessage>
235235
),
236236
})
237237

@@ -248,9 +248,9 @@ const usePoolAlert = (poolData?: PoolData | PoolDataCache) => {
248248
subtitle: t`This pool has been misconfigured. It has been set to withdraw only. To minimize impact withdraw in balanced proportion instead of single sided.`,
249249
},
250250
message: (
251-
<MessageWrapper>
251+
<PoolAlertMessage>
252252
<p>{t`This pool is in withdraw only mode.`}</p>
253-
</MessageWrapper>
253+
</PoolAlertMessage>
254254
),
255255
})
256256

0 commit comments

Comments
 (0)