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
3f1258f7
Commit
3f1258f7
authored
Jan 26, 2023
by
tom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
InternalLink component
parent
42dacdb9
Changes
27
Show whitespace changes
Inline
Side-by-side
Showing
27 changed files
with
126 additions
and
90 deletions
+126
-90
AddressDetails.tsx
ui/address/AddressDetails.tsx
+8
-5
AddressBlocksValidatedListItem.tsx
...ddress/blocksValidated/AddressBlocksValidatedListItem.tsx
+3
-2
AddressBlocksValidatedTableItem.tsx
...dress/blocksValidated/AddressBlocksValidatedTableItem.tsx
+3
-2
AddressCoinBalanceListItem.tsx
ui/address/coinBalance/AddressCoinBalanceListItem.tsx
+3
-2
AddressCoinBalanceTableItem.tsx
ui/address/coinBalance/AddressCoinBalanceTableItem.tsx
+3
-2
ContractCode.tsx
ui/address/contract/ContractCode.tsx
+6
-3
ContractWriteResultDumb.tsx
ui/address/contract/ContractWriteResultDumb.tsx
+3
-2
AddressCounterItem.tsx
ui/address/details/AddressCounterItem.tsx
+5
-7
AddressNameInfo.tsx
ui/address/details/AddressNameInfo.tsx
+3
-3
AddressIntTxsListItem.tsx
ui/address/internals/AddressIntTxsListItem.tsx
+3
-2
AddressIntTxsTableItem.tsx
ui/address/internals/AddressIntTxsTableItem.tsx
+3
-2
BlockDetails.tsx
ui/block/BlockDetails.tsx
+4
-6
BlocksListItem.tsx
ui/blocks/BlocksListItem.tsx
+4
-3
BlocksTableItem.tsx
ui/blocks/BlocksTableItem.tsx
+4
-3
LatestBlocks.tsx
ui/home/LatestBlocks.tsx
+3
-2
LatestBlocksItem.tsx
ui/home/LatestBlocksItem.tsx
+3
-3
LatestTxs.tsx
ui/home/LatestTxs.tsx
+4
-3
SearchResultListItem.tsx
ui/searchResults/SearchResultListItem.tsx
+6
-5
SearchResultTableItem.tsx
ui/searchResults/SearchResultTableItem.tsx
+8
-7
LinkInternal.tsx
ui/shared/LinkInternal.tsx
+19
-0
PageTitle.tsx
ui/shared/Page/PageTitle.tsx
+4
-3
AddressLink.tsx
ui/shared/address/AddressLink.tsx
+11
-11
LogItem.tsx
ui/shared/logs/LogItem.tsx
+1
-1
TxDetailsTokenTransfers.tsx
ui/tx/details/TxDetailsTokenTransfers.tsx
+5
-5
TxAdditionalInfoContent.tsx
ui/txs/TxAdditionalInfoContent.tsx
+3
-2
TxsListItem.tsx
ui/txs/TxsListItem.tsx
+2
-2
TxsTableItem.tsx
ui/txs/TxsTableItem.tsx
+2
-2
No files found.
ui/address/AddressDetails.tsx
View file @
3f1258f7
import
{
Box
,
Flex
,
Text
,
Icon
,
Grid
,
Link
}
from
'
@chakra-ui/react
'
;
import
{
Box
,
Flex
,
Text
,
Icon
,
Grid
}
from
'
@chakra-ui/react
'
;
import
type
{
UseQueryResult
}
from
'
@tanstack/react-query
'
;
import
{
useRouter
}
from
'
next/router
'
;
import
React
from
'
react
'
;
...
...
@@ -19,6 +19,7 @@ import DetailsInfoItem from 'ui/shared/DetailsInfoItem';
import
ExternalLink
from
'
ui/shared/ExternalLink
'
;
import
HashStringShorten
from
'
ui/shared/HashStringShorten
'
;
import
HashStringShortenDynamic
from
'
ui/shared/HashStringShortenDynamic
'
;
import
LinkInternal
from
'
ui/shared/LinkInternal
'
;
import
AddressAddToMetaMask
from
'
./details/AddressAddToMetaMask
'
;
import
AddressBalance
from
'
./details/AddressBalance
'
;
...
...
@@ -83,7 +84,7 @@ const AddressDetails = ({ addressQuery, scrollRef }: Props) => {
<
Flex
mt=
{
8
}
columnGap=
{
4
}
flexWrap=
"wrap"
>
<
Text
fontSize=
"sm"
>
Verify with other explorers
</
Text
>
{
explorers
.
map
((
explorer
)
=>
{
const
url
=
new
URL
(
explorer
.
paths
.
tx
+
'
/
'
+
router
.
query
.
id
,
explorer
.
baseUrl
);
const
url
=
new
URL
(
explorer
.
paths
.
address
+
'
/
'
+
router
.
query
.
id
,
explorer
.
baseUrl
);
return
<
ExternalLink
key=
{
explorer
.
baseUrl
}
title=
{
explorer
.
title
}
href=
{
url
.
toString
()
}
/>;
})
}
</
Flex
>
...
...
@@ -111,7 +112,9 @@ const AddressDetails = ({ addressQuery, scrollRef }: Props) => {
hint=
"Implementation address of the proxy contract."
columnGap=
{
1
}
>
<
Link
href=
{
link
(
'
address_index
'
,
{
id
:
addressQuery
.
data
.
implementation_address
})
}
>
{
addressQuery
.
data
.
implementation_name
}
</
Link
>
<
LinkInternal
href=
{
link
(
'
address_index
'
,
{
id
:
addressQuery
.
data
.
implementation_address
})
}
>
{
addressQuery
.
data
.
implementation_name
}
</
LinkInternal
>
<
Text
variant=
"secondary"
overflow=
"hidden"
>
<
HashStringShortenDynamic
hash=
{
`(${ addressQuery.data.implementation_address })`
}
/>
</
Text
>
...
...
@@ -163,14 +166,14 @@ const AddressDetails = ({ addressQuery, scrollRef }: Props) => {
alignSelf=
"center"
py=
{
{
base
:
'
2px
'
,
lg
:
1
}
}
>
<
Link
<
Link
Internal
href=
{
link
(
'
block
'
,
{
id
:
String
(
addressQuery
.
data
.
block_number_balance_updated_at
)
})
}
display=
"flex"
alignItems=
"center"
>
<
Icon
as=
{
blockIcon
}
boxSize=
{
6
}
mr=
{
2
}
/>
{
addressQuery
.
data
.
block_number_balance_updated_at
}
</
Link
>
</
Link
Internal
>
</
DetailsInfoItem
>
)
}
</
Grid
>
...
...
ui/address/blocksValidated/AddressBlocksValidatedListItem.tsx
View file @
3f1258f7
import
{
Link
,
Text
,
Flex
}
from
'
@chakra-ui/react
'
;
import
{
Text
,
Flex
}
from
'
@chakra-ui/react
'
;
import
BigNumber
from
'
bignumber.js
'
;
import
React
from
'
react
'
;
...
...
@@ -8,6 +8,7 @@ import appConfig from 'configs/app/config';
import
getBlockTotalReward
from
'
lib/block/getBlockTotalReward
'
;
import
useTimeAgoIncrement
from
'
lib/hooks/useTimeAgoIncrement
'
;
import
link
from
'
lib/link/link
'
;
import
LinkInternal
from
'
ui/shared/LinkInternal
'
;
import
ListItemMobile
from
'
ui/shared/ListItemMobile
'
;
import
Utilization
from
'
ui/shared/Utilization/Utilization
'
;
...
...
@@ -23,7 +24,7 @@ const AddressBlocksValidatedListItem = (props: Props) => {
return
(
<
ListItemMobile
rowGap=
{
2
}
isAnimated
>
<
Flex
justifyContent=
"space-between"
w=
"100%"
>
<
Link
href=
{
blockUrl
}
fontWeight=
"700"
>
{
props
.
height
}
</
Link
>
<
Link
Internal
href=
{
blockUrl
}
fontWeight=
"700"
>
{
props
.
height
}
</
LinkInternal
>
<
Text
variant=
"secondary"
>
{
timeAgo
}
</
Text
>
</
Flex
>
<
Flex
columnGap=
{
2
}
w=
"100%"
>
...
...
ui/address/blocksValidated/AddressBlocksValidatedTableItem.tsx
View file @
3f1258f7
import
{
Link
,
Td
,
Tr
,
Text
,
Box
,
Flex
}
from
'
@chakra-ui/react
'
;
import
{
Td
,
Tr
,
Text
,
Box
,
Flex
}
from
'
@chakra-ui/react
'
;
import
BigNumber
from
'
bignumber.js
'
;
import
React
from
'
react
'
;
...
...
@@ -7,6 +7,7 @@ import type { Block } from 'types/api/block';
import
getBlockTotalReward
from
'
lib/block/getBlockTotalReward
'
;
import
useTimeAgoIncrement
from
'
lib/hooks/useTimeAgoIncrement
'
;
import
link
from
'
lib/link/link
'
;
import
LinkInternal
from
'
ui/shared/LinkInternal
'
;
import
Utilization
from
'
ui/shared/Utilization/Utilization
'
;
type
Props
=
Block
&
{
...
...
@@ -21,7 +22,7 @@ const AddressBlocksValidatedTableItem = (props: Props) => {
return
(
<
Tr
>
<
Td
>
<
Link
href=
{
blockUrl
}
fontWeight=
"700"
>
{
props
.
height
}
</
Link
>
<
Link
Internal
href=
{
blockUrl
}
fontWeight=
"700"
>
{
props
.
height
}
</
LinkInternal
>
</
Td
>
<
Td
>
<
Text
variant=
"secondary"
>
{
timeAgo
}
</
Text
>
...
...
ui/address/coinBalance/AddressCoinBalanceListItem.tsx
View file @
3f1258f7
import
{
Link
,
Text
,
Stat
,
StatHelpText
,
StatArrow
,
Flex
}
from
'
@chakra-ui/react
'
;
import
{
Text
,
Stat
,
StatHelpText
,
StatArrow
,
Flex
}
from
'
@chakra-ui/react
'
;
import
BigNumber
from
'
bignumber.js
'
;
import
React
from
'
react
'
;
...
...
@@ -10,6 +10,7 @@ import useTimeAgoIncrement from 'lib/hooks/useTimeAgoIncrement';
import
link
from
'
lib/link/link
'
;
import
Address
from
'
ui/shared/address/Address
'
;
import
AddressLink
from
'
ui/shared/address/AddressLink
'
;
import
LinkInternal
from
'
ui/shared/LinkInternal
'
;
import
ListItemMobile
from
'
ui/shared/ListItemMobile
'
;
type
Props
=
AddressCoinBalanceHistoryItem
&
{
...
...
@@ -37,7 +38,7 @@ const AddressCoinBalanceListItem = (props: Props) => {
</
Flex
>
<
Flex
columnGap=
{
2
}
w=
"100%"
>
<
Text
fontWeight=
{
500
}
flexShrink=
{
0
}
>
Block
</
Text
>
<
Link
href=
{
blockUrl
}
fontWeight=
"700"
>
{
props
.
block_number
}
</
Link
>
<
Link
Internal
href=
{
blockUrl
}
fontWeight=
"700"
>
{
props
.
block_number
}
</
LinkInternal
>
</
Flex
>
{
props
.
transaction_hash
&&
(
<
Flex
columnGap=
{
2
}
w=
"100%"
>
...
...
ui/address/coinBalance/AddressCoinBalanceTableItem.tsx
View file @
3f1258f7
import
{
Link
,
Td
,
Tr
,
Text
,
Stat
,
StatHelpText
,
StatArrow
}
from
'
@chakra-ui/react
'
;
import
{
Td
,
Tr
,
Text
,
Stat
,
StatHelpText
,
StatArrow
}
from
'
@chakra-ui/react
'
;
import
BigNumber
from
'
bignumber.js
'
;
import
React
from
'
react
'
;
...
...
@@ -9,6 +9,7 @@ import useTimeAgoIncrement from 'lib/hooks/useTimeAgoIncrement';
import
link
from
'
lib/link/link
'
;
import
Address
from
'
ui/shared/address/Address
'
;
import
AddressLink
from
'
ui/shared/address/AddressLink
'
;
import
LinkInternal
from
'
ui/shared/LinkInternal
'
;
type
Props
=
AddressCoinBalanceHistoryItem
&
{
page
:
number
;
...
...
@@ -23,7 +24,7 @@ const AddressCoinBalanceTableItem = (props: Props) => {
return
(
<
Tr
>
<
Td
>
<
Link
href=
{
blockUrl
}
fontWeight=
"700"
>
{
props
.
block_number
}
</
Link
>
<
Link
Internal
href=
{
blockUrl
}
fontWeight=
"700"
>
{
props
.
block_number
}
</
LinkInternal
>
</
Td
>
<
Td
>
{
props
.
transaction_hash
?
...
...
ui/address/contract/ContractCode.tsx
View file @
3f1258f7
...
...
@@ -9,6 +9,7 @@ import AddressIcon from 'ui/shared/address/AddressIcon';
import
AddressLink
from
'
ui/shared/address/AddressLink
'
;
import
DataFetchAlert
from
'
ui/shared/DataFetchAlert
'
;
import
ExternalLink
from
'
ui/shared/ExternalLink
'
;
import
LinkInternal
from
'
ui/shared/LinkInternal
'
;
import
RawDataSnippet
from
'
ui/shared/RawDataSnippet
'
;
import
ContractSourceCode
from
'
./ContractSourceCode
'
;
...
...
@@ -72,7 +73,9 @@ const ContractCode = () => {
const
decoded
=
data
.
decoded_constructor_args
.
map
(([
value
,
{
name
,
type
}
],
index
)
=>
{
const
valueEl
=
type
===
'
address
'
?
<
Link
href=
{
link
(
'
address_index
'
,
{
id
:
value
})
}
>
{
value
}
</
Link
>
:
<
span
>
{
value
}
</
span
>;
const
valueEl
=
type
===
'
address
'
?
<
LinkInternal
href=
{
link
(
'
address_index
'
,
{
id
:
value
})
}
>
{
value
}
</
LinkInternal
>
:
<
span
>
{
value
}
</
span
>;
return
(
<
Box
key=
{
index
}
>
<
span
>
Arg [
{
index
}
]
{
name
||
''
}
(
{
type
}
):
</
span
>
...
...
@@ -98,7 +101,7 @@ const ContractCode = () => {
return
data
.
external_libraries
.
map
((
item
)
=>
(
<
Box
key=
{
item
.
address_hash
}
>
<
chakra
.
span
fontWeight=
{
500
}
>
{
item
.
name
}
:
</
chakra
.
span
>
<
Link
href=
{
link
(
'
address_index
'
,
{
id
:
item
.
address_hash
},
{
tab
:
'
contract
'
})
}
>
{
item
.
address_hash
}
</
Link
>
<
Link
Internal
href=
{
link
(
'
address_index
'
,
{
id
:
item
.
address_hash
},
{
tab
:
'
contract
'
})
}
>
{
item
.
address_hash
}
</
LinkInternal
>
</
Box
>
));
})();
...
...
@@ -126,7 +129,7 @@ const ContractCode = () => {
<
AddressLink
type=
"address"
hash=
{
data
.
verified_twin_address_hash
}
truncation=
"constant"
ml=
{
2
}
/>
</
Address
>
<
chakra
.
span
mt=
{
1
}
>
All functions displayed below are from ABI of that contract. In order to verify current contract, proceed with
</
chakra
.
span
>
<
Link
href=
{
link
(
'
address_contract_verification
'
,
{
id
:
data
.
verified_twin_address_hash
})
}
>
Verify
&
Publish
</
Link
>
<
Link
Internal
href=
{
link
(
'
address_contract_verification
'
,
{
id
:
data
.
verified_twin_address_hash
})
}
>
Verify
&
Publish
</
LinkInternal
>
<
span
>
page
</
span
>
</
Alert
>
)
}
...
...
ui/address/contract/ContractWriteResultDumb.tsx
View file @
3f1258f7
import
{
Box
,
chakra
,
Link
,
Spinner
}
from
'
@chakra-ui/react
'
;
import
{
Box
,
chakra
,
Spinner
}
from
'
@chakra-ui/react
'
;
import
React
from
'
react
'
;
import
type
{
ContractMethodWriteResult
}
from
'
./types
'
;
import
link
from
'
lib/link/link
'
;
import
LinkInternal
from
'
ui/shared/LinkInternal
'
;
interface
Props
{
result
:
ContractMethodWriteResult
;
...
...
@@ -30,7 +31,7 @@ const ContractWriteResultDumb = ({ result, onSettle, txInfo }: Props) => {
const
isErrorResult
=
'
message
'
in
result
;
const
txLink
=
(
<
Link
href=
{
link
(
'
tx
'
,
{
id
:
txHash
})
}
>
View transaction details
</
Link
>
<
Link
Internal
href=
{
link
(
'
tx
'
,
{
id
:
txHash
})
}
>
View transaction details
</
LinkInternal
>
);
const
content
=
(()
=>
{
...
...
ui/address/details/AddressCounterItem.tsx
View file @
3f1258f7
import
{
Link
,
Skeleton
}
from
'
@chakra-ui/react
'
;
import
{
Skeleton
}
from
'
@chakra-ui/react
'
;
import
type
{
UseQueryResult
}
from
'
@tanstack/react-query
'
;
import
BigNumber
from
'
bignumber.js
'
;
import
NextLink
from
'
next/link
'
;
import
React
from
'
react
'
;
import
type
{
AddressCounters
}
from
'
types/api/address
'
;
import
link
from
'
lib/link/link
'
;
import
LinkInternal
from
'
ui/shared/LinkInternal
'
;
interface
Props
{
prop
:
keyof
AddressCounters
;
...
...
@@ -42,11 +42,9 @@ const AddressCounterItem = ({ prop, query, address, onClick }: Props) => {
return
<
span
>
0
</
span
>;
}
return
(
<
NextLink
href=
{
link
(
'
address_index
'
,
{
id
:
address
},
{
tab
:
PROP_TO_TAB
[
prop
]
})
}
passHref
>
<
Link
onClick=
{
onClick
}
>
<
LinkInternal
href=
{
link
(
'
address_index
'
,
{
id
:
address
},
{
tab
:
PROP_TO_TAB
[
prop
]
})
}
onClick=
{
onClick
}
>
{
Number
(
data
).
toLocaleString
()
}
</
Link
>
</
NextLink
>
</
LinkInternal
>
);
}
}
...
...
ui/address/details/AddressNameInfo.tsx
View file @
3f1258f7
import
{
Link
}
from
'
@chakra-ui/react
'
;
import
React
from
'
react
'
;
import
type
{
Address
}
from
'
types/api/address
'
;
import
link
from
'
lib/link/link
'
;
import
DetailsInfoItem
from
'
ui/shared/DetailsInfoItem
'
;
import
LinkInternal
from
'
ui/shared/LinkInternal
'
;
interface
Props
{
data
:
Address
;
...
...
@@ -17,9 +17,9 @@ const AddressNameInfo = ({ data }: Props) => {
title=
"Token name"
hint=
"Token name and symbol"
>
<
Link
href=
{
link
(
'
token_index
'
,
{
hash
:
data
.
token
.
address
})
}
>
<
Link
Internal
href=
{
link
(
'
token_index
'
,
{
hash
:
data
.
token
.
address
})
}
>
{
data
.
token
.
name
}
(
{
data
.
token
.
symbol
}
)
</
Link
>
</
Link
Internal
>
</
DetailsInfoItem
>
);
}
...
...
ui/address/internals/AddressIntTxsListItem.tsx
View file @
3f1258f7
import
{
Flex
,
Tag
,
Icon
,
Box
,
HStack
,
Text
,
Link
}
from
'
@chakra-ui/react
'
;
import
{
Flex
,
Tag
,
Icon
,
Box
,
HStack
,
Text
}
from
'
@chakra-ui/react
'
;
import
BigNumber
from
'
bignumber.js
'
;
import
React
from
'
react
'
;
...
...
@@ -12,6 +12,7 @@ import Address from 'ui/shared/address/Address';
import
AddressIcon
from
'
ui/shared/address/AddressIcon
'
;
import
AddressLink
from
'
ui/shared/address/AddressLink
'
;
import
InOutTag
from
'
ui/shared/InOutTag
'
;
import
LinkInternal
from
'
ui/shared/LinkInternal
'
;
import
ListItemMobile
from
'
ui/shared/ListItemMobile
'
;
import
TxStatus
from
'
ui/shared/TxStatus
'
;
import
{
TX_INTERNALS_ITEMS
}
from
'
ui/tx/internals/utils
'
;
...
...
@@ -49,7 +50,7 @@ const TxInternalsListItem = ({
</
Flex
>
<
HStack
spacing=
{
1
}
>
<
Text
fontSize=
"sm"
fontWeight=
{
500
}
>
Block
</
Text
>
<
Link
href=
{
link
(
'
block
'
,
{
id
:
block
.
toString
()
})
}
>
{
block
}
</
Link
>
<
Link
Internal
href=
{
link
(
'
block
'
,
{
id
:
block
.
toString
()
})
}
>
{
block
}
</
LinkInternal
>
</
HStack
>
<
Box
w=
"100%"
display=
"flex"
columnGap=
{
3
}
>
<
Address
width=
"calc((100% - 48px) / 2)"
>
...
...
ui/address/internals/AddressIntTxsTableItem.tsx
View file @
3f1258f7
import
{
Tr
,
Td
,
Tag
,
Icon
,
Box
,
Flex
,
Text
,
Link
}
from
'
@chakra-ui/react
'
;
import
{
Tr
,
Td
,
Tag
,
Icon
,
Box
,
Flex
,
Text
}
from
'
@chakra-ui/react
'
;
import
BigNumber
from
'
bignumber.js
'
;
import
React
from
'
react
'
;
...
...
@@ -12,6 +12,7 @@ import Address from 'ui/shared/address/Address';
import
AddressIcon
from
'
ui/shared/address/AddressIcon
'
;
import
AddressLink
from
'
ui/shared/address/AddressLink
'
;
import
InOutTag
from
'
ui/shared/InOutTag
'
;
import
LinkInternal
from
'
ui/shared/LinkInternal
'
;
import
TxStatus
from
'
ui/shared/TxStatus
'
;
import
{
TX_INTERNALS_ITEMS
}
from
'
ui/tx/internals/utils
'
;
...
...
@@ -57,7 +58,7 @@ const AddressIntTxsTableItem = ({
</
Flex
>
</
Td
>
<
Td
verticalAlign=
"middle"
>
<
Link
href=
{
link
(
'
block
'
,
{
id
:
block
.
toString
()
})
}
>
{
block
}
</
Link
>
<
Link
Internal
href=
{
link
(
'
block
'
,
{
id
:
block
.
toString
()
})
}
>
{
block
}
</
LinkInternal
>
</
Td
>
<
Td
verticalAlign=
"middle"
>
<
Address
display=
"inline-flex"
maxW=
"100%"
>
...
...
ui/block/BlockDetails.tsx
View file @
3f1258f7
import
{
Grid
,
GridItem
,
Text
,
Icon
,
Link
,
Box
,
Tooltip
}
from
'
@chakra-ui/react
'
;
import
BigNumber
from
'
bignumber.js
'
;
import
capitalize
from
'
lodash/capitalize
'
;
import
NextLink
from
'
next/link
'
;
import
{
useRouter
}
from
'
next/router
'
;
import
React
from
'
react
'
;
import
{
scroller
,
Element
}
from
'
react-scroll
'
;
...
...
@@ -23,6 +22,7 @@ import DataFetchAlert from 'ui/shared/DataFetchAlert';
import
DetailsInfoItem
from
'
ui/shared/DetailsInfoItem
'
;
import
GasUsedToTargetRatio
from
'
ui/shared/GasUsedToTargetRatio
'
;
import
HashStringShortenDynamic
from
'
ui/shared/HashStringShortenDynamic
'
;
import
LinkInternal
from
'
ui/shared/LinkInternal
'
;
import
PrevNext
from
'
ui/shared/PrevNext
'
;
import
TextSeparator
from
'
ui/shared/TextSeparator
'
;
import
Utilization
from
'
ui/shared/Utilization/Utilization
'
;
...
...
@@ -116,11 +116,9 @@ const BlockDetails = () => {
title=
"Transactions"
hint=
"The number of transactions in the block."
>
<
NextLink
href=
{
link
(
'
block
'
,
{
id
:
router
.
query
.
id
},
{
tab
:
'
txs
'
})
}
passHref
>
<
Link
>
<
LinkInternal
href=
{
link
(
'
block
'
,
{
id
:
router
.
query
.
id
},
{
tab
:
'
txs
'
})
}
>
{
data
.
tx_count
}
transactions
</
Link
>
</
NextLink
>
</
LinkInternal
>
</
DetailsInfoItem
>
<
DetailsInfoItem
title=
{
appConfig
.
network
.
verificationType
===
'
validation
'
?
'
Validated by
'
:
'
Mined by
'
}
...
...
ui/blocks/BlocksListItem.tsx
View file @
3f1258f7
import
{
Flex
,
Link
,
Spinner
,
Text
,
Box
,
Icon
}
from
'
@chakra-ui/react
'
;
import
{
Flex
,
Spinner
,
Text
,
Box
,
Icon
}
from
'
@chakra-ui/react
'
;
import
BigNumber
from
'
bignumber.js
'
;
import
capitalize
from
'
lodash/capitalize
'
;
import
React
from
'
react
'
;
...
...
@@ -14,6 +14,7 @@ import getNetworkValidatorTitle from 'lib/networks/getNetworkValidatorTitle';
import
BlockTimestamp
from
'
ui/blocks/BlockTimestamp
'
;
import
AddressLink
from
'
ui/shared/address/AddressLink
'
;
import
GasUsedToTargetRatio
from
'
ui/shared/GasUsedToTargetRatio
'
;
import
LinkInternal
from
'
ui/shared/LinkInternal
'
;
import
ListItemMobile
from
'
ui/shared/ListItemMobile
'
;
import
Utilization
from
'
ui/shared/Utilization/Utilization
'
;
...
...
@@ -33,12 +34,12 @@ const BlocksListItem = ({ data, isPending, enableTimeIncrement }: Props) => {
<
Flex
justifyContent=
"space-between"
w=
"100%"
>
<
Flex
columnGap=
{
2
}
alignItems=
"center"
>
{
isPending
&&
<
Spinner
size=
"sm"
/>
}
<
Link
<
Link
Internal
fontWeight=
{
600
}
href=
{
link
(
'
block
'
,
{
id
:
String
(
data
.
height
)
})
}
>
{
data
.
height
}
</
Link
>
</
Link
Internal
>
</
Flex
>
<
BlockTimestamp
ts=
{
data
.
timestamp
}
isEnabled=
{
enableTimeIncrement
}
/>
</
Flex
>
...
...
ui/blocks/BlocksTableItem.tsx
View file @
3f1258f7
import
{
Tr
,
Td
,
Link
,
Flex
,
Box
,
Icon
,
Tooltip
,
Spinner
,
useColorModeValue
}
from
'
@chakra-ui/react
'
;
import
{
Tr
,
Td
,
Flex
,
Box
,
Icon
,
Tooltip
,
Spinner
,
useColorModeValue
}
from
'
@chakra-ui/react
'
;
import
BigNumber
from
'
bignumber.js
'
;
import
{
motion
}
from
'
framer-motion
'
;
import
React
from
'
react
'
;
...
...
@@ -12,6 +12,7 @@ import link from 'lib/link/link';
import
BlockTimestamp
from
'
ui/blocks/BlockTimestamp
'
;
import
AddressLink
from
'
ui/shared/address/AddressLink
'
;
import
GasUsedToTargetRatio
from
'
ui/shared/GasUsedToTargetRatio
'
;
import
LinkInternal
from
'
ui/shared/LinkInternal
'
;
import
Utilization
from
'
ui/shared/Utilization/Utilization
'
;
interface
Props
{
...
...
@@ -38,12 +39,12 @@ const BlocksTableItem = ({ data, isPending, enableTimeIncrement }: Props) => {
<
Flex
columnGap=
{
2
}
alignItems=
"center"
mb=
{
2
}
>
{
isPending
&&
<
Spinner
size=
"sm"
flexShrink=
{
0
}
/>
}
<
Tooltip
isDisabled=
{
data
.
type
!==
'
reorg
'
}
label=
"Chain reorganizations"
>
<
Link
<
Link
Internal
fontWeight=
{
600
}
href=
{
link
(
'
block
'
,
{
id
:
String
(
data
.
height
)
})
}
>
{
data
.
height
}
</
Link
>
</
Link
Internal
>
</
Tooltip
>
</
Flex
>
<
BlockTimestamp
ts=
{
data
.
timestamp
}
isEnabled=
{
enableTimeIncrement
}
/>
...
...
ui/home/LatestBlocks.tsx
View file @
3f1258f7
import
{
Box
,
Heading
,
Flex
,
Link
,
Text
,
VStack
,
Skeleton
}
from
'
@chakra-ui/react
'
;
import
{
Box
,
Heading
,
Flex
,
Text
,
VStack
,
Skeleton
}
from
'
@chakra-ui/react
'
;
import
{
useQueryClient
}
from
'
@tanstack/react-query
'
;
import
{
AnimatePresence
}
from
'
framer-motion
'
;
import
React
from
'
react
'
;
...
...
@@ -12,6 +12,7 @@ import { nbsp } from 'lib/html-entities';
import
link
from
'
lib/link/link
'
;
import
useSocketChannel
from
'
lib/socket/useSocketChannel
'
;
import
useSocketMessage
from
'
lib/socket/useSocketMessage
'
;
import
LinkInternal
from
'
ui/shared/LinkInternal
'
;
import
LatestBlocksItem
from
'
./LatestBlocksItem
'
;
import
LatestBlocksItemSkeleton
from
'
./LatestBlocksItemSkeleton
'
;
...
...
@@ -93,7 +94,7 @@ const LatestBlocks = () => {
</
AnimatePresence
>
</
VStack
>
<
Flex
justifyContent=
"center"
>
<
Link
fontSize=
"sm"
href=
{
link
(
'
blocks
'
)
}
>
View all blocks
</
Link
>
<
Link
Internal
fontSize=
"sm"
href=
{
link
(
'
blocks
'
)
}
>
View all blocks
</
LinkInternal
>
</
Flex
>
</>
);
...
...
ui/home/LatestBlocksItem.tsx
View file @
3f1258f7
...
...
@@ -5,7 +5,6 @@ import {
GridItem
,
HStack
,
Icon
,
Link
,
Text
,
}
from
'
@chakra-ui/react
'
;
import
{
motion
}
from
'
framer-motion
'
;
...
...
@@ -18,6 +17,7 @@ import getBlockTotalReward from 'lib/block/getBlockTotalReward';
import
link
from
'
lib/link/link
'
;
import
BlockTimestamp
from
'
ui/blocks/BlockTimestamp
'
;
import
AddressLink
from
'
ui/shared/address/AddressLink
'
;
import
LinkInternal
from
'
ui/shared/LinkInternal
'
;
type
Props
=
{
block
:
Block
;
...
...
@@ -43,13 +43,13 @@ const LatestBlocksItem = ({ block, h }: Props) => {
<
Flex
justifyContent=
"space-between"
alignItems=
"center"
mb=
{
3
}
>
<
HStack
spacing=
{
2
}
>
<
Icon
as=
{
blockIcon
}
boxSize=
"30px"
color=
"link"
/>
<
Link
<
Link
Internal
href=
{
link
(
'
block
'
,
{
id
:
String
(
block
.
height
)
})
}
fontSize=
"xl"
fontWeight=
"500"
>
{
block
.
height
}
</
Link
>
</
Link
Internal
>
</
HStack
>
<
BlockTimestamp
ts=
{
block
.
timestamp
}
isEnabled
fontSize=
"sm"
/>
</
Flex
>
...
...
ui/home/LatestTxs.tsx
View file @
3f1258f7
import
{
Box
,
Heading
,
Flex
,
Link
,
Text
,
Skeleton
}
from
'
@chakra-ui/react
'
;
import
{
Box
,
Heading
,
Flex
,
Text
,
Skeleton
}
from
'
@chakra-ui/react
'
;
import
React
from
'
react
'
;
import
useApiQuery
from
'
lib/api/useApiQuery
'
;
import
useIsMobile
from
'
lib/hooks/useIsMobile
'
;
import
useNewTxsSocket
from
'
lib/hooks/useNewTxsSocket
'
;
import
link
from
'
lib/link/link
'
;
import
LinkInternal
from
'
ui/shared/LinkInternal
'
;
import
SocketNewItemsNotice
from
'
ui/shared/SocketNewItemsNotice
'
;
import
LatestTxsItem
from
'
./LatestTxsItem
'
;
...
...
@@ -36,12 +37,12 @@ const LatestTransactions = () => {
const
txsUrl
=
link
(
'
txs
'
);
content
=
(
<>
<
SocketNewItemsNotice
borderBottomRadius=
{
0
}
url=
{
link
(
'
txs
'
)
}
num=
{
num
}
alert=
{
socketAlert
}
/>
<
SocketNewItemsNotice
borderBottomRadius=
{
0
}
url=
{
txsUrl
}
num=
{
num
}
alert=
{
socketAlert
}
/>
<
Box
mb=
{
{
base
:
3
,
lg
:
4
}
}
>
{
data
.
slice
(
0
,
txsCount
).
map
((
tx
=>
<
LatestTxsItem
key=
{
tx
.
hash
}
tx=
{
tx
}
/>))
}
</
Box
>
<
Flex
justifyContent=
"center"
>
<
Link
fontSize=
"sm"
href=
{
txsUrl
}
>
View all transactions
</
Link
>
<
Link
Internal
fontSize=
"sm"
href=
{
txsUrl
}
>
View all transactions
</
LinkInternal
>
</
Flex
>
</>
);
...
...
ui/searchResults/SearchResultListItem.tsx
View file @
3f1258f7
import
{
Text
,
Link
,
Flex
,
Icon
,
Box
,
chakra
}
from
'
@chakra-ui/react
'
;
import
{
Text
,
Flex
,
Icon
,
Box
,
chakra
}
from
'
@chakra-ui/react
'
;
import
React
from
'
react
'
;
import
type
{
SearchResultItem
}
from
'
types/api/search
'
;
...
...
@@ -11,6 +11,7 @@ import Address from 'ui/shared/address/Address';
import
AddressIcon
from
'
ui/shared/address/AddressIcon
'
;
import
AddressLink
from
'
ui/shared/address/AddressLink
'
;
import
HashStringShortenDynamic
from
'
ui/shared/HashStringShortenDynamic
'
;
import
LinkInternal
from
'
ui/shared/LinkInternal
'
;
import
ListItemMobile
from
'
ui/shared/ListItemMobile
'
;
import
TokenLogo
from
'
ui/shared/TokenLogo
'
;
...
...
@@ -29,9 +30,9 @@ const SearchResultListItem = ({ data, searchTerm }: Props) => {
return
(
<
Flex
alignItems=
"flex-start"
>
<
TokenLogo
boxSize=
{
6
}
hash=
{
data
.
address
}
name=
{
data
.
name
}
flexShrink=
{
0
}
/>
<
Link
ml=
{
2
}
href=
{
link
(
'
token_index
'
,
{
hash
:
data
.
address
})
}
fontWeight=
{
700
}
wordBreak=
"break-all"
>
<
Link
Internal
ml=
{
2
}
href=
{
link
(
'
token_index
'
,
{
hash
:
data
.
address
})
}
fontWeight=
{
700
}
wordBreak=
"break-all"
>
<
chakra
.
span
dangerouslySetInnerHTML=
{
{
__html
:
highlightText
(
name
,
searchTerm
)
}
}
/>
</
Link
>
</
Link
Internal
>
</
Flex
>
);
}
...
...
@@ -54,9 +55,9 @@ const SearchResultListItem = ({ data, searchTerm }: Props) => {
return
(
<
Flex
alignItems=
"center"
>
<
Icon
as=
{
blockIcon
}
boxSize=
{
6
}
mr=
{
2
}
color=
"gray.500"
/>
<
Link
fontWeight=
{
700
}
href=
{
link
(
'
block
'
,
{
id
:
String
(
data
.
block_number
)
})
}
>
<
Link
Internal
fontWeight=
{
700
}
href=
{
link
(
'
block
'
,
{
id
:
String
(
data
.
block_number
)
})
}
>
<
Box
as=
{
shouldHighlightHash
?
'
span
'
:
'
mark
'
}
>
{
data
.
block_number
}
</
Box
>
</
Link
>
</
Link
Internal
>
</
Flex
>
);
}
...
...
ui/searchResults/SearchResultTableItem.tsx
View file @
3f1258f7
import
{
Tr
,
Td
,
Text
,
Link
,
Flex
,
Icon
,
Box
}
from
'
@chakra-ui/react
'
;
import
{
Tr
,
Td
,
Text
,
Flex
,
Icon
,
Box
}
from
'
@chakra-ui/react
'
;
import
React
from
'
react
'
;
import
type
{
SearchResultItem
}
from
'
types/api/search
'
;
...
...
@@ -11,6 +11,7 @@ import Address from 'ui/shared/address/Address';
import
AddressIcon
from
'
ui/shared/address/AddressIcon
'
;
import
AddressLink
from
'
ui/shared/address/AddressLink
'
;
import
HashStringShortenDynamic
from
'
ui/shared/HashStringShortenDynamic
'
;
import
LinkInternal
from
'
ui/shared/LinkInternal
'
;
import
TokenLogo
from
'
ui/shared/TokenLogo
'
;
interface
Props
{
...
...
@@ -29,9 +30,9 @@ const SearchResultTableItem = ({ data, searchTerm }: Props) => {
<
Td
fontSize=
"sm"
>
<
Flex
alignItems=
"center"
>
<
TokenLogo
boxSize=
{
6
}
hash=
{
data
.
address
}
name=
{
data
.
name
}
flexShrink=
{
0
}
/>
<
Link
ml=
{
2
}
href=
{
link
(
'
token_index
'
,
{
hash
:
data
.
address
})
}
fontWeight=
{
700
}
wordBreak=
"break-all"
>
<
Link
Internal
ml=
{
2
}
href=
{
link
(
'
token_index
'
,
{
hash
:
data
.
address
})
}
fontWeight=
{
700
}
wordBreak=
"break-all"
>
<
span
dangerouslySetInnerHTML=
{
{
__html
:
highlightText
(
name
,
searchTerm
)
}
}
/>
</
Link
>
</
Link
Internal
>
</
Flex
>
</
Td
>
<
Td
fontSize=
"sm"
verticalAlign=
"middle"
>
...
...
@@ -52,11 +53,11 @@ const SearchResultTableItem = ({ data, searchTerm }: Props) => {
<
Td
fontSize=
"sm"
>
<
Flex
alignItems=
"center"
overflow=
"hidden"
>
<
AddressIcon
address=
{
{
hash
:
data
.
address
,
is_contract
:
data
.
type
===
'
contract
'
,
implementation_name
:
null
}
}
mr=
{
2
}
flexShrink=
{
0
}
/>
<
Link
href=
{
link
(
'
address_index
'
,
{
id
:
data
.
address
})
}
fontWeight=
{
700
}
overflow=
"hidden"
whiteSpace=
"nowrap"
>
<
Link
Internal
href=
{
link
(
'
address_index
'
,
{
id
:
data
.
address
})
}
fontWeight=
{
700
}
overflow=
"hidden"
whiteSpace=
"nowrap"
>
<
Box
as=
{
shouldHighlightHash
?
'
mark
'
:
'
span
'
}
display=
"block"
>
<
HashStringShortenDynamic
hash=
{
data
.
address
}
/>
</
Box
>
</
Link
>
</
Link
Internal
>
</
Flex
>
</
Td
>
<
Td
fontSize=
"sm"
verticalAlign=
"middle"
>
...
...
@@ -86,9 +87,9 @@ const SearchResultTableItem = ({ data, searchTerm }: Props) => {
<
Td
fontSize=
"sm"
>
<
Flex
alignItems=
"center"
>
<
Icon
as=
{
blockIcon
}
boxSize=
{
6
}
mr=
{
2
}
color=
"gray.500"
/>
<
Link
fontWeight=
{
700
}
href=
{
link
(
'
block
'
,
{
id
:
String
(
data
.
block_number
)
})
}
>
<
Link
Internal
fontWeight=
{
700
}
href=
{
link
(
'
block
'
,
{
id
:
String
(
data
.
block_number
)
})
}
>
<
Box
as=
{
shouldHighlightHash
?
'
span
'
:
'
mark
'
}
>
{
data
.
block_number
}
</
Box
>
</
Link
>
</
Link
Internal
>
</
Flex
>
</
Td
>
<
Td
fontSize=
"sm"
verticalAlign=
"middle"
>
...
...
ui/shared/LinkInternal.tsx
0 → 100644
View file @
3f1258f7
import
type
{
LinkProps
}
from
'
@chakra-ui/react
'
;
import
{
Link
}
from
'
@chakra-ui/react
'
;
import
NextLink
from
'
next/link
'
;
import
React
from
'
react
'
;
// NOTE! use this component only for links to pages that are completely implemented in new UI
const
LinkInternal
=
(
props
:
LinkProps
)
=>
{
if
(
!
props
.
href
)
{
return
<
Link
{
...
props
}
/>;
}
return
(
<
NextLink
href=
{
props
.
href
}
passHref
target=
{
props
.
target
}
>
<
Link
{
...
props
}
/>
</
NextLink
>
);
};
export
default
React
.
memo
(
LinkInternal
);
ui/shared/Page/PageTitle.tsx
View file @
3f1258f7
import
{
Heading
,
Flex
,
Tooltip
,
Link
,
Icon
,
chakra
}
from
'
@chakra-ui/react
'
;
import
{
Heading
,
Flex
,
Tooltip
,
Icon
,
chakra
}
from
'
@chakra-ui/react
'
;
import
React
from
'
react
'
;
import
eastArrowIcon
from
'
icons/arrows/east.svg
'
;
import
TextAd
from
'
ui/shared/ad/TextAd
'
;
import
LinkInternal
from
'
ui/shared/LinkInternal
'
;
type
Props
=
{
text
:
string
;
...
...
@@ -47,9 +48,9 @@ const PageTitle = ({ text, additionals, withTextAd, backLinkUrl, backLinkLabel,
>
{
backLinkUrl
&&
(
<
Tooltip
label=
{
backLinkLabel
}
>
<
Link
display=
"inline-flex"
href=
{
backLinkUrl
}
>
<
Link
Internal
display=
"inline-flex"
href=
{
backLinkUrl
}
>
<
Icon
as=
{
eastArrowIcon
}
boxSize=
{
6
}
transform=
"rotate(180deg)"
/>
</
Link
>
</
Link
Internal
>
</
Tooltip
>
)
}
{
title
}
...
...
ui/shared/address/AddressLink.tsx
View file @
3f1258f7
import
{
Link
,
chakra
,
shouldForwardProp
,
Tooltip
,
Box
}
from
'
@chakra-ui/react
'
;
import
NextLink
from
'
next/link
'
;
import
{
chakra
,
shouldForwardProp
,
Tooltip
,
Box
}
from
'
@chakra-ui/react
'
;
import
type
{
HTMLAttributeAnchorTarget
}
from
'
react
'
;
import
React
from
'
react
'
;
...
...
@@ -7,6 +6,7 @@ import useIsMobile from 'lib/hooks/useIsMobile';
import
link
from
'
lib/link/link
'
;
import
HashStringShorten
from
'
ui/shared/HashStringShorten
'
;
import
HashStringShortenDynamic
from
'
ui/shared/HashStringShortenDynamic
'
;
import
LinkInternal
from
'
ui/shared/LinkInternal
'
;
import
TruncatedTextTooltip
from
'
../TruncatedTextTooltip
'
;
...
...
@@ -94,15 +94,15 @@ const AddressLink = (props: Props) => {
}
return
(
<
NextLink
href=
{
url
}
passHref
target=
{
target
}
>
<
Link
<
LinkInternal
className=
{
className
}
href=
{
url
}
target=
{
target
}
overflow=
"hidden"
whiteSpace=
"nowrap"
>
{
content
}
</
Link
>
</
NextLink
>
</
LinkInternal
>
);
};
...
...
ui/shared/logs/LogItem.tsx
View file @
3f1258f7
...
...
@@ -58,7 +58,7 @@ const LogItem = ({ address, index, topics, data, decoded, type, tx_hash: txHash
<
AddressLink
hash=
{
hasTxInfo
?
txHash
:
address
.
hash
}
alias=
{
hasTxInfo
?
undefined
:
address
.
name
}
type=
{
type
}
type=
{
type
===
'
address
'
?
'
transaction
'
:
'
address
'
}
/>
</
Address
>
{
/* api doesn't have find topic feature yet */
}
...
...
ui/tx/details/TxDetailsTokenTransfers.tsx
View file @
3f1258f7
import
{
Icon
,
Link
,
GridItem
,
Show
,
Flex
}
from
'
@chakra-ui/react
'
;
import
NextLink
from
'
next/link
'
;
import
{
Icon
,
GridItem
,
Show
,
Flex
}
from
'
@chakra-ui/react
'
;
import
React
from
'
react
'
;
import
type
{
TokenTransfer
}
from
'
types/api/tokenTransfer
'
;
...
...
@@ -7,6 +6,7 @@ import type { TokenTransfer } from 'types/api/tokenTransfer';
import
tokenIcon
from
'
icons/token.svg
'
;
import
link
from
'
lib/link/link
'
;
import
DetailsInfoItem
from
'
ui/shared/DetailsInfoItem
'
;
import
LinkInternal
from
'
ui/shared/LinkInternal
'
;
import
{
flattenTotal
}
from
'
ui/shared/TokenTransfer/helpers
'
;
import
TxDetailsTokenTransfer
from
'
./TxDetailsTokenTransfer
'
;
...
...
@@ -64,9 +64,9 @@ const TxDetailsTokenTransfers = ({ data, txHash }: Props) => {
<
Show
above=
"lg"
><
GridItem
></
GridItem
></
Show
>
<
GridItem
fontSize=
"sm"
alignItems=
"center"
display=
"inline-flex"
pl=
{
{
base
:
'
28px
'
,
lg
:
0
}
}
>
<
Icon
as=
{
tokenIcon
}
boxSize=
{
6
}
/>
<
NextLink
href=
{
viewAllUrl
}
passHref
>
<
Link
>
View all
</
Link
>
</
NextLink
>
<
LinkInternal
href=
{
viewAllUrl
}
>
View all
</
LinkInternal
>
</
GridItem
>
</>
)
}
...
...
ui/txs/TxAdditionalInfoContent.tsx
View file @
3f1258f7
import
{
Box
,
Heading
,
Text
,
Flex
,
Link
}
from
'
@chakra-ui/react
'
;
import
{
Box
,
Heading
,
Text
,
Flex
}
from
'
@chakra-ui/react
'
;
import
BigNumber
from
'
bignumber.js
'
;
import
React
from
'
react
'
;
...
...
@@ -8,6 +8,7 @@ import appConfig from 'configs/app/config';
import
getValueWithUnit
from
'
lib/getValueWithUnit
'
;
import
link
from
'
lib/link/link
'
;
import
CurrencyValue
from
'
ui/shared/CurrencyValue
'
;
import
LinkInternal
from
'
ui/shared/LinkInternal
'
;
import
TextSeparator
from
'
ui/shared/TextSeparator
'
;
import
Utilization
from
'
ui/shared/Utilization/Utilization
'
;
...
...
@@ -89,7 +90,7 @@ const TxAdditionalInfoContent = ({ tx }: { tx: Transaction }) => {
<
Text
fontWeight=
"600"
as=
"span"
>
{
tx
.
position
}
</
Text
>
</
Box
>
</
Box
>
<
Link
fontSize=
"sm"
href=
{
link
(
'
tx
'
,
{
id
:
tx
.
hash
})
}
>
More details
</
Link
>
<
Link
Internal
fontSize=
"sm"
href=
{
link
(
'
tx
'
,
{
id
:
tx
.
hash
})
}
>
More details
</
LinkInternal
>
</>
);
};
...
...
ui/txs/TxsListItem.tsx
View file @
3f1258f7
...
...
@@ -3,7 +3,6 @@ import {
Box
,
Flex
,
Icon
,
Link
,
Text
,
}
from
'
@chakra-ui/react
'
;
import
React
from
'
react
'
;
...
...
@@ -20,6 +19,7 @@ import Address from 'ui/shared/address/Address';
import
AddressIcon
from
'
ui/shared/address/AddressIcon
'
;
import
AddressLink
from
'
ui/shared/address/AddressLink
'
;
import
InOutTag
from
'
ui/shared/InOutTag
'
;
import
LinkInternal
from
'
ui/shared/LinkInternal
'
;
import
ListItemMobile
from
'
ui/shared/ListItemMobile
'
;
import
TxStatus
from
'
ui/shared/TxStatus
'
;
import
TxAdditionalInfo
from
'
ui/txs/TxAdditionalInfo
'
;
...
...
@@ -88,7 +88,7 @@ const TxsListItem = ({ tx, showBlockInfo, currentAddress, enableTimeIncrement }:
{
showBlockInfo
&&
tx
.
block
!==
null
&&
(
<
Box
mt=
{
2
}
>
<
Text
as=
"span"
>
Block
</
Text
>
<
Link
href=
{
link
(
'
block
'
,
{
id
:
tx
.
block
.
toString
()
})
}
>
{
tx
.
block
}
</
Link
>
<
Link
Internal
href=
{
link
(
'
block
'
,
{
id
:
tx
.
block
.
toString
()
})
}
>
{
tx
.
block
}
</
LinkInternal
>
</
Box
>
)
}
<
Flex
alignItems=
"center"
height=
{
6
}
mt=
{
6
}
>
...
...
ui/txs/TxsTableItem.tsx
View file @
3f1258f7
...
...
@@ -3,7 +3,6 @@ import {
Tr
,
Td
,
Tag
,
Link
,
Icon
,
VStack
,
Text
,
...
...
@@ -23,6 +22,7 @@ import AddressIcon from 'ui/shared/address/AddressIcon';
import
AddressLink
from
'
ui/shared/address/AddressLink
'
;
import
CurrencyValue
from
'
ui/shared/CurrencyValue
'
;
import
InOutTag
from
'
ui/shared/InOutTag
'
;
import
LinkInternal
from
'
ui/shared/LinkInternal
'
;
import
TruncatedTextTooltip
from
'
ui/shared/TruncatedTextTooltip
'
;
import
TxStatus
from
'
ui/shared/TxStatus
'
;
import
TxAdditionalInfo
from
'
ui/txs/TxAdditionalInfo
'
;
...
...
@@ -99,7 +99,7 @@ const TxsTableItem = ({ tx, showBlockInfo, currentAddress, enableTimeIncrement }
</
Td
>
{
showBlockInfo
&&
(
<
Td
>
{
tx
.
block
&&
<
Link
href=
{
link
(
'
block
'
,
{
id
:
tx
.
block
.
toString
()
})
}
>
{
tx
.
block
}
</
Link
>
}
{
tx
.
block
&&
<
Link
Internal
href=
{
link
(
'
block
'
,
{
id
:
tx
.
block
.
toString
()
})
}
>
{
tx
.
block
}
</
LinkInternal
>
}
</
Td
>
)
}
<
Show
above=
"xl"
ssr=
{
false
}
>
...
...
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