Commit fe9d805d authored by vignesh mohankumar's avatar vignesh mohankumar Committed by GitHub

fix: link to swap with inputCurrency from mobile token detail (#4647)

parent b6c13683
...@@ -3,6 +3,7 @@ import { useToken } from 'hooks/Tokens' ...@@ -3,6 +3,7 @@ import { useToken } from 'hooks/Tokens'
import { useNetworkTokenBalances } from 'hooks/useNetworkTokenBalances' import { useNetworkTokenBalances } from 'hooks/useNetworkTokenBalances'
import { useState } from 'react' import { useState } from 'react'
import { AlertTriangle } from 'react-feather' import { AlertTriangle } from 'react-feather'
import { Link } from 'react-router-dom'
import styled from 'styled-components/macro' import styled from 'styled-components/macro'
import { SMALLEST_MOBILE_MEDIA_BREAKPOINT } from '../constants' import { SMALLEST_MOBILE_MEDIA_BREAKPOINT } from '../constants'
...@@ -173,9 +174,11 @@ export default function FooterBalanceSummary({ ...@@ -173,9 +174,11 @@ export default function FooterBalanceSummary({
)} )}
</BalanceInfo> </BalanceInfo>
)} )}
<SwapButton onClick={() => (window.location.href = 'https://app.uniswap.org/#/swap')}> <Link to={`/swap?inputCurrency=${address}`}>
<SwapButton>
<Trans>Swap</Trans> <Trans>Swap</Trans>
</SwapButton> </SwapButton>
</Link>
</TotalBalancesSection> </TotalBalancesSection>
{showMultipleBalances && ( {showMultipleBalances && (
<NetworkBalancesSection> <NetworkBalancesSection>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment