Skip to content

Commit 7896f15

Browse files
committed
fix: migrate screen top panel
1 parent c08266c commit 7896f15

File tree

3 files changed

+17
-21
lines changed

3 files changed

+17
-21
lines changed

src/locales/en/messages.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/locales/en/messages.po

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1095,6 +1095,10 @@ msgstr "Menu"
10951095
msgid "Migrate"
10961096
msgstr "Migrate"
10971097

1098+
#: src/modules/migration/MigrationTopPanel.tsx
1099+
msgid "Migrate from {0} V2 to {1} V3"
1100+
msgstr "Migrate from {0} V2 to {1} V3"
1101+
10981102
#: src/ui-config/menu-items/index.tsx
10991103
msgid "Migrate to V3"
11001104
msgstr "Migrate to V3"
@@ -1111,10 +1115,6 @@ msgstr "Migrating"
11111115
msgid "Migrating multiple collaterals and borrowed assets at the same time can be an expensive operation and might fail in certain situations.<0>Therefore it’s not recommended to migrate positions with more than 5 assets (deposited + borrowed) at the same time.</0>"
11121116
msgstr "Migrating multiple collaterals and borrowed assets at the same time can be an expensive operation and might fail in certain situations.<0>Therefore it’s not recommended to migrate positions with more than 5 assets (deposited + borrowed) at the same time.</0>"
11131117

1114-
#: src/modules/migration/MigrationTopPanel.tsx
1115-
msgid "Migration"
1116-
msgstr "Migration"
1117-
11181118
#: src/modules/migration/MigrationBottomPanel.tsx
11191119
msgid "Migration & Health factor change"
11201120
msgstr "Migration & Health factor change"
@@ -1721,10 +1721,6 @@ msgstr "Switching E-Mode"
17211721
msgid "Switching rate"
17221722
msgstr "Switching rate"
17231723

1724-
#: src/modules/migration/MigrationTopPanel.tsx
1725-
msgid "TODO: text about migration"
1726-
msgstr "TODO: text about migration"
1727-
17281724
#: src/modules/faucet/FaucetAssetsList.tsx
17291725
msgid "Test Assets"
17301726
msgstr "Test Assets"

src/modules/migration/MigrationTopPanel.tsx

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11
import { Trans } from '@lingui/macro';
2-
import { Box, Typography, useMediaQuery, useTheme } from '@mui/material';
32
import { PageTitle } from 'src/components/TopInfoPanel/PageTitle';
43
import { TopInfoPanel } from 'src/components/TopInfoPanel/TopInfoPanel';
54

5+
import { getMarketInfoById } from '../../components/MarketSwitcher';
6+
import { useProtocolDataContext } from '../../hooks/useProtocolDataContext';
7+
68
export const MigrationTopPanel = () => {
7-
const { breakpoints } = useTheme();
8-
const md = useMediaQuery(breakpoints.down('md'));
9-
const xsm = useMediaQuery(breakpoints.down('xsm'));
9+
const { currentMarket } = useProtocolDataContext();
10+
const { market } = getMarketInfoById(currentMarket);
1011

1112
return (
1213
<TopInfoPanel
1314
pageTitle={<></>}
1415
titleComponent={
15-
<Box>
16-
<PageTitle pageTitle={<Trans>Migration</Trans>} withMarketSwitcher={true} />
17-
<Box sx={{ width: md ? (xsm ? '320px' : '540px') : '860px' }}>
18-
<Typography variant="description" color="#A5A8B6">
19-
<Trans>TODO: text about migration</Trans>
20-
</Typography>
21-
</Box>
22-
</Box>
16+
<PageTitle
17+
pageTitle={
18+
<Trans>
19+
Migrate from {market.marketTitle} V2 to {market.marketTitle} V3
20+
</Trans>
21+
}
22+
/>
2323
}
2424
/>
2525
);

0 commit comments

Comments
 (0)