Revert "Remove swap from top bar"

This reverts commit 19e83a204c.
This commit is contained in:
armaniferrante 2021-08-18 14:42:16 -07:00
parent 7528e94dda
commit ef478b393c
No known key found for this signature in database
GPG Key ID: 58BEF301E91F7828
1 changed files with 12 additions and 0 deletions

View File

@ -47,6 +47,7 @@ const EXTERNAL_LINKS = {
'/developer-resources': 'https://serum-academy.com/en/developer-resources/',
'/explorer': 'https://solscan.io',
'/srm-faq': 'https://projectserum.com/srm-faq',
'/swap': 'https://swap.projectserum.com',
};
export default function TopBar() {
@ -158,6 +159,17 @@ export default function TopBar() {
<Menu.Item key={tradePageUrl} style={{ margin: '0 10px 0 20px' }}>
TRADE
</Menu.Item>
{!searchFocussed && (
<Menu.Item key="/swap" style={{ margin: '0 10px' }}>
<a
href={EXTERNAL_LINKS['/swap']}
target="_blank"
rel="noopener noreferrer"
>
SWAP
</a>
</Menu.Item>
)}
{connected && (!searchFocussed || location.pathname === '/balances') && (
<Menu.Item key="/balances" style={{ margin: '0 10px' }}>
BALANCES