Commit 5257188f authored by Kaylee George's avatar Kaylee George Committed by GitHub

fix: fix token details 'share to twitter' information (#4469)

add twitter correct link
parent 75992399
......@@ -62,6 +62,7 @@ const ShareAction = styled.div`
interface TokenInfo {
tokenName: string
tokenSymbol: string
tokenAddress: string
}
export default function ShareButton(tokenInfo: TokenInfo) {
......@@ -76,7 +77,7 @@ export default function ShareButton(tokenInfo: TokenInfo) {
const shareTweet = () => {
toggleShare()
window.open(
`https://twitter.com/intent/tweet?text=Check%20out%20${tokenInfo.tokenName}%20(${tokenInfo.tokenSymbol})%20https://app.uniswap.org/%23/tokens/${tokenInfo.tokenSymbol}%20via%20@uniswap`,
`https://twitter.com/intent/tweet?text=Check%20out%20${tokenInfo.tokenName}%20(${tokenInfo.tokenSymbol})%20https://app.uniswap.org/%23/tokens/${tokenInfo.tokenAddress}%20via%20@uniswap`,
'newwindow',
`left=${positionX}, top=${positionY}, width=${TWITTER_WIDTH}, height=${TWITTER_HEIGHT}`
)
......
......@@ -363,7 +363,9 @@ export default function LoadedTokenDetail({ address }: { address: string }) {
)}
</TokenNameCell>
<TokenActions>
{tokenName && tokenSymbol && <ShareButton tokenName={tokenName} tokenSymbol={tokenSymbol} />}
{tokenName && tokenSymbol && (
<ShareButton tokenName={tokenName} tokenSymbol={tokenSymbol} tokenAddress={address} />
)}
<ClickFavorited onClick={toggleFavorite}>
<FavoriteIcon isFavorited={isFavorited} />
</ClickFavorited>
......
......@@ -86,7 +86,7 @@ export default function TokenDetails() {
let tokenDetail
if (!tokenAddress) {
// TODO: handle no address / invalid address cases
tokenDetail = 'invalid token'
tokenDetail = 'invalid token address'
} else if (loading) {
tokenDetail = <LoadingTokenDetail />
} else {
......
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