Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 52 additions & 3 deletions src/components/MarketSwitcher.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,7 @@ export const MarketSwitcher = () => {
<Box sx={{ display: 'flex', flexWrap: 'wrap', px: 1.5 }}>
{other.map((id) => renderGridItem(id, mobile))}
</Box>
{(l2.length > 0 || (showLegacy && legacy.length > 0)) && <Divider sx={{ my: 1 }} />}
{(l2.length > 0 || showLegacy) && <Divider sx={{ my: 1 }} />}
</Box>
)}

Expand All @@ -556,16 +556,65 @@ export const MarketSwitcher = () => {
<Box sx={{ display: 'flex', flexWrap: 'wrap', px: 1.5 }}>
{l2.map((id) => renderGridItem(id, mobile))}
</Box>
{showLegacy && legacy.length > 0 && <Divider sx={{ my: 1 }} />}
{showLegacy && <Divider sx={{ my: 1 }} />}
</Box>
)}

{/* Legacy */}
{showLegacy && legacy.length > 0 && (
{showLegacy && (
<Box>
{sectionHeader(<Trans>Legacy</Trans>)}
<Box sx={{ display: 'flex', flexWrap: 'wrap', px: 1.5 }}>
{legacy.map((id) => renderGridItem(id, mobile))}
{/* V2 markets external link */}
<Box
role="button"
tabIndex={0}
onClick={() => window.open('https://v2-market.aave.com/', '_blank')}
onKeyDown={(e: React.KeyboardEvent) => {
if (e.key === 'Enter' || e.key === ' ') {
e.preventDefault();
window.open('https://v2-market.aave.com/', '_blank');
}
}}
sx={{
display: 'flex',
alignItems: 'center',
py: '10px',
px: '12px',
width: mobile ? '50%' : '33.33%',
boxSizing: 'border-box',
borderRadius: '8px',
cursor: 'pointer',
'&:hover': { bgcolor: 'action.hover' },
}}
>
<Box sx={{ width: 20, height: 20, mr: 1, flexShrink: 0 }}>
<img
src="/favicon.ico"
alt=""
width="100%"
height="100%"
style={{ display: 'block', objectFit: 'contain' }}
/>
</Box>
<Typography
noWrap
sx={{
flex: '1 1 0',
minWidth: 0,
fontSize: '14px',
fontWeight: 600,
letterSpacing: '0.15px',
lineHeight: '20px',
}}
>
<Trans>V2 Markets</Trans>
</Typography>
<SvgIcon sx={{ fontSize: '14px', color: 'text.muted', ml: 0.5, flexShrink: 0 }}>
<ExternalLinkIcon />
</SvgIcon>
</Box>
</Box>
</Box>
)}
Expand Down
2 changes: 1 addition & 1 deletion src/locales/el/messages.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/locales/en/messages.js

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions src/locales/en/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -743,6 +743,10 @@ msgstr "Quorum"
msgid "Current votes"
msgstr "Current votes"

#: src/components/MarketSwitcher.tsx
msgid "V2 Markets"
msgstr "V2 Markets"

#: src/components/caps/CapsTooltip.tsx
msgid "This asset has almost reached its borrow cap. There is only {messageValue} available to be borrowed from this market."
msgstr "This asset has almost reached its borrow cap. There is only {messageValue} available to be borrowed from this market."
Expand Down
2 changes: 1 addition & 1 deletion src/locales/es/messages.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/locales/fr/messages.js

Large diffs are not rendered by default.

Loading