Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
frontend
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
vicotor
frontend
Commits
b26c8962
Commit
b26c8962
authored
Nov 08, 2022
by
tom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nft link
parent
14eb5be3
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
16 deletions
+29
-16
TokenTransferListItem.tsx
ui/shared/TokenTransfer/TokenTransferListItem.tsx
+2
-8
TokenTransferNft.tsx
ui/shared/TokenTransfer/TokenTransferNft.tsx
+24
-0
TokenTransferTableItem.tsx
ui/shared/TokenTransfer/TokenTransferTableItem.tsx
+3
-8
No files found.
ui/shared/TokenTransfer/TokenTransferListItem.tsx
View file @
b26c8962
...
...
@@ -5,7 +5,6 @@ import React from 'react';
import
type
{
TokenTransfer
}
from
'
types/api/tokenTransfer
'
;
import
eastArrowIcon
from
'
icons/arrows/east.svg
'
;
import
nftPlaceholder
from
'
icons/nft_shield.svg
'
;
import
AccountListItemMobile
from
'
ui/shared/AccountListItemMobile
'
;
import
AdditionalInfoButton
from
'
ui/shared/AdditionalInfoButton
'
;
import
Address
from
'
ui/shared/address/Address
'
;
...
...
@@ -14,6 +13,7 @@ import AddressLink from 'ui/shared/address/AddressLink';
import
InOutTag
from
'
ui/shared/InOutTag
'
;
import
TokenSnippet
from
'
ui/shared/TokenSnippet
'
;
import
{
getTokenTransferTypeText
}
from
'
ui/shared/TokenTransfer/helpers
'
;
import
TokenTransferNft
from
'
ui/shared/TokenTransfer/TokenTransferNft
'
;
type
Props
=
TokenTransfer
&
{
baseAddress
?:
string
;
...
...
@@ -38,13 +38,7 @@ const TokenTransferListItem = ({ token, total, tx_hash: txHash, from, to, baseAd
<
Tag
colorScheme=
"orange"
>
{
getTokenTransferTypeText
(
type
)
}
</
Tag
>
{
showTxInfo
&&
<
AdditionalInfoButton
position=
"absolute"
top=
{
0
}
right=
{
0
}
/>
}
</
Flex
>
{
'
token_id
'
in
total
&&
(
<
Flex
alignItems=
"center"
>
<
Text
fontWeight=
{
500
}
>
Token ID
</
Text
>
<
Icon
mx=
{
1
}
as=
{
nftPlaceholder
}
boxSize=
"30px"
/>
<
AddressLink
hash=
{
token
.
address
}
id=
{
total
.
token_id
}
type=
"token_instance_item"
/>
</
Flex
>
)
}
{
'
token_id
'
in
total
&&
<
TokenTransferNft
hash=
{
token
.
address
}
id=
{
total
.
token_id
}
/>
}
{
showTxInfo
&&
(
<
Flex
columnGap=
{
2
}
w=
"100%"
>
<
Text
fontWeight=
{
500
}
flexShrink=
{
0
}
>
Txn hash
</
Text
>
...
...
ui/shared/TokenTransfer/TokenTransferNft.tsx
0 → 100644
View file @
b26c8962
import
{
Box
,
Icon
,
Link
}
from
'
@chakra-ui/react
'
;
import
React
from
'
react
'
;
import
nftPlaceholder
from
'
icons/nft_shield.svg
'
;
import
link
from
'
lib/link/link
'
;
import
HashStringShortenDynamic
from
'
ui/shared/HashStringShortenDynamic
'
;
interface
Props
{
hash
:
string
;
id
:
string
;
}
const
TokenTransferNft
=
({
hash
,
id
}:
Props
)
=>
{
return
(
<
Link
href=
{
link
(
'
token_instance_item
'
,
{
hash
,
id
})
}
overflow=
"hidden"
whiteSpace=
"nowrap"
display=
"flex"
alignItems=
"center"
w=
"100%"
>
<
Icon
as=
{
nftPlaceholder
}
boxSize=
"30px"
mr=
{
1
}
color=
"inherit"
/>
<
Box
maxW=
"calc(100% - 34px)"
>
<
HashStringShortenDynamic
hash=
{
id
}
fontWeight=
{
500
}
/>
</
Box
>
</
Link
>
);
};
export
default
React
.
memo
(
TokenTransferNft
);
ui/shared/TokenTransfer/TokenTransferTableItem.tsx
View file @
b26c8962
import
{
Tr
,
Td
,
Tag
,
Icon
,
Flex
}
from
'
@chakra-ui/react
'
;
import
{
Tr
,
Td
,
Tag
,
Flex
}
from
'
@chakra-ui/react
'
;
import
BigNumber
from
'
bignumber.js
'
;
import
React
from
'
react
'
;
import
type
{
TokenTransfer
}
from
'
types/api/tokenTransfer
'
;
import
nftPlaceholder
from
'
icons/nft_shield.svg
'
;
import
AdditionalInfoButton
from
'
ui/shared/AdditionalInfoButton
'
;
import
Address
from
'
ui/shared/address/Address
'
;
import
AddressIcon
from
'
ui/shared/address/AddressIcon
'
;
...
...
@@ -12,6 +11,7 @@ import AddressLink from 'ui/shared/address/AddressLink';
import
InOutTag
from
'
ui/shared/InOutTag
'
;
import
TokenSnippet
from
'
ui/shared/TokenSnippet
'
;
import
{
getTokenTransferTypeText
}
from
'
ui/shared/TokenTransfer/helpers
'
;
import
TokenTransferNft
from
'
ui/shared/TokenTransfer/TokenTransferNft
'
;
type
Props
=
TokenTransfer
&
{
baseAddress
?:
string
;
...
...
@@ -42,12 +42,7 @@ const TxInternalTableItem = ({ token, total, tx_hash: txHash, from, to, baseAddr
</
Flex
>
</
Td
>
<
Td
lineHeight=
"30px"
>
{
'
token_id
'
in
total
?
(
<
Flex
align=
"center"
>
<
Icon
as=
{
nftPlaceholder
}
boxSize=
"30px"
mr=
{
1
}
/>
<
AddressLink
hash=
{
token
.
address
}
id=
{
total
.
token_id
}
type=
"token_instance_item"
/>
</
Flex
>
)
:
'
-
'
}
{
'
token_id
'
in
total
?
<
TokenTransferNft
hash=
{
token
.
address
}
id=
{
total
.
token_id
}
/>
:
'
-
'
}
</
Td
>
{
showTxInfo
&&
(
<
Td
>
...
...
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