Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
interface
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
LuckySwap
interface
Commits
5257188f
Unverified
Commit
5257188f
authored
Aug 24, 2022
by
Kaylee George
Committed by
GitHub
Aug 24, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: fix token details 'share to twitter' information (#4469)
add twitter correct link
parent
75992399
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
3 deletions
+6
-3
ShareButton.tsx
src/components/Tokens/TokenDetails/ShareButton.tsx
+2
-1
TokenDetail.tsx
src/components/Tokens/TokenDetails/TokenDetail.tsx
+3
-1
index.tsx
src/pages/TokenDetails/index.tsx
+1
-1
No files found.
src/components/Tokens/TokenDetails/ShareButton.tsx
View file @
5257188f
...
@@ -62,6 +62,7 @@ const ShareAction = styled.div`
...
@@ -62,6 +62,7 @@ const ShareAction = styled.div`
interface
TokenInfo
{
interface
TokenInfo
{
tokenName
:
string
tokenName
:
string
tokenSymbol
:
string
tokenSymbol
:
string
tokenAddress
:
string
}
}
export
default
function
ShareButton
(
tokenInfo
:
TokenInfo
)
{
export
default
function
ShareButton
(
tokenInfo
:
TokenInfo
)
{
...
@@ -76,7 +77,7 @@ export default function ShareButton(tokenInfo: TokenInfo) {
...
@@ -76,7 +77,7 @@ export default function ShareButton(tokenInfo: TokenInfo) {
const
shareTweet
=
()
=>
{
const
shareTweet
=
()
=>
{
toggleShare
()
toggleShare
()
window
.
open
(
window
.
open
(
`https://twitter.com/intent/tweet?text=Check%20out%20
${
tokenInfo
.
tokenName
}
%20(
${
tokenInfo
.
tokenSymbol
}
)%20https://app.uniswap.org/%23/tokens/
${
tokenInfo
.
token
Symbol
}
%20via%20@uniswap`
,
`https://twitter.com/intent/tweet?text=Check%20out%20
${
tokenInfo
.
tokenName
}
%20(
${
tokenInfo
.
tokenSymbol
}
)%20https://app.uniswap.org/%23/tokens/
${
tokenInfo
.
token
Address
}
%20via%20@uniswap`
,
'
newwindow
'
,
'
newwindow
'
,
`left=
${
positionX
}
, top=
${
positionY
}
, width=
${
TWITTER_WIDTH
}
, height=
${
TWITTER_HEIGHT
}
`
`left=
${
positionX
}
, top=
${
positionY
}
, width=
${
TWITTER_WIDTH
}
, height=
${
TWITTER_HEIGHT
}
`
)
)
...
...
src/components/Tokens/TokenDetails/TokenDetail.tsx
View file @
5257188f
...
@@ -363,7 +363,9 @@ export default function LoadedTokenDetail({ address }: { address: string }) {
...
@@ -363,7 +363,9 @@ export default function LoadedTokenDetail({ address }: { address: string }) {
)
}
)
}
</
TokenNameCell
>
</
TokenNameCell
>
<
TokenActions
>
<
TokenActions
>
{
tokenName
&&
tokenSymbol
&&
<
ShareButton
tokenName=
{
tokenName
}
tokenSymbol=
{
tokenSymbol
}
/>
}
{
tokenName
&&
tokenSymbol
&&
(
<
ShareButton
tokenName=
{
tokenName
}
tokenSymbol=
{
tokenSymbol
}
tokenAddress=
{
address
}
/>
)
}
<
ClickFavorited
onClick=
{
toggleFavorite
}
>
<
ClickFavorited
onClick=
{
toggleFavorite
}
>
<
FavoriteIcon
isFavorited=
{
isFavorited
}
/>
<
FavoriteIcon
isFavorited=
{
isFavorited
}
/>
</
ClickFavorited
>
</
ClickFavorited
>
...
...
src/pages/TokenDetails/index.tsx
View file @
5257188f
...
@@ -86,7 +86,7 @@ export default function TokenDetails() {
...
@@ -86,7 +86,7 @@ export default function TokenDetails() {
let
tokenDetail
let
tokenDetail
if
(
!
tokenAddress
)
{
if
(
!
tokenAddress
)
{
// TODO: handle no address / invalid address cases
// TODO: handle no address / invalid address cases
tokenDetail
=
'
invalid token
'
tokenDetail
=
'
invalid token
address
'
}
else
if
(
loading
)
{
}
else
if
(
loading
)
{
tokenDetail
=
<
LoadingTokenDetail
/>
tokenDetail
=
<
LoadingTokenDetail
/>
}
else
{
}
else
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment