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
db52d2cf
Commit
db52d2cf
authored
May 26, 2023
by
isstuev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
block hash or height
parent
ddc68cf9
Changes
37
Hide whitespace changes
Inline
Side-by-side
Showing
37 changed files
with
73 additions
and
59 deletions
+73
-59
resources.ts
lib/api/resources.ts
+6
-6
useNavItems.tsx
lib/hooks/useNavItems.tsx
+1
-1
getPageType.ts
lib/mixpanel/getPageType.ts
+1
-1
getSeo.ts
lib/next/block/getSeo.ts
+6
-3
getServerSideProps.ts
lib/next/getServerSideProps.ts
+1
-1
[height_or_hash].tsx
pages/block/[height_or_hash].tsx
+2
-2
nextjs-routes.d.ts
types/nextjs-routes.d.ts
+1
-1
AddressDetails.tsx
ui/address/AddressDetails.tsx
+1
-1
AddressBlocksValidatedListItem.tsx
...ddress/blocksValidated/AddressBlocksValidatedListItem.tsx
+1
-1
AddressBlocksValidatedTableItem.tsx
...dress/blocksValidated/AddressBlocksValidatedTableItem.tsx
+1
-1
AddressCoinBalanceListItem.tsx
ui/address/coinBalance/AddressCoinBalanceListItem.tsx
+1
-1
AddressCoinBalanceTableItem.tsx
ui/address/coinBalance/AddressCoinBalanceTableItem.tsx
+1
-1
AddressIntTxsListItem.tsx
ui/address/internals/AddressIntTxsListItem.tsx
+1
-1
AddressIntTxsTableItem.tsx
ui/address/internals/AddressIntTxsTableItem.tsx
+1
-1
BlockDetails.tsx
ui/block/BlockDetails.tsx
+3
-3
BlocksListItem.tsx
ui/blocks/BlocksListItem.tsx
+5
-2
BlocksTableItem.tsx
ui/blocks/BlocksTableItem.tsx
+8
-2
LatestBlocksItem.tsx
ui/home/LatestBlocksItem.tsx
+1
-1
LatestDepositsItem.tsx
ui/home/LatestDepositsItem.tsx
+3
-1
DepositsListItem.tsx
ui/l2Deposits/DepositsListItem.tsx
+1
-1
DepositsTableItem.tsx
ui/l2Deposits/DepositsTableItem.tsx
+1
-1
OutputRootsListItem.tsx
ui/l2OutputRoots/OutputRootsListItem.tsx
+1
-1
OutputRootsTableItem.tsx
ui/l2OutputRoots/OutputRootsTableItem.tsx
+1
-1
TxnBatchesListItem.tsx
ui/l2TxnBatches/TxnBatchesListItem.tsx
+3
-3
TxnBatchesTableItem.tsx
ui/l2TxnBatches/TxnBatchesTableItem.tsx
+3
-3
Block.tsx
ui/pages/Block.tsx
+7
-7
SearchResults.tsx
ui/pages/SearchResults.tsx
+1
-1
SearchResultListItem.tsx
ui/searchResults/SearchResultListItem.tsx
+1
-1
SearchResultTableItem.tsx
ui/searchResults/SearchResultTableItem.tsx
+1
-1
AppErrorBlockConsensus.tsx
ui/shared/AppError/AppErrorBlockConsensus.tsx
+1
-1
AddressLink.tsx
ui/shared/address/AddressLink.tsx
+1
-1
SearchBarSuggestItem.tsx
ui/snippets/searchBar/SearchBarSuggestItem.tsx
+1
-1
TxDetails.tsx
ui/tx/TxDetails.tsx
+1
-1
TxsListItem.tsx
ui/txs/TxsListItem.tsx
+1
-1
TxsTableItem.tsx
ui/txs/TxsTableItem.tsx
+1
-1
WithdrawalsListItem.tsx
ui/withdrawals/WithdrawalsListItem.tsx
+1
-1
WithdrawalsTableItem.tsx
ui/withdrawals/WithdrawalsTableItem.tsx
+1
-1
No files found.
lib/api/resources.ts
View file @
db52d2cf
...
@@ -164,18 +164,18 @@ export const RESOURCES = {
...
@@ -164,18 +164,18 @@ export const RESOURCES = {
filterFields
:
[
'
type
'
as
const
],
filterFields
:
[
'
type
'
as
const
],
},
},
block
:
{
block
:
{
path
:
'
/api/v2/blocks/:height
'
,
path
:
'
/api/v2/blocks/:height
_or_hash
'
,
pathParams
:
[
'
height
'
as
const
],
pathParams
:
[
'
height
_or_hash
'
as
const
],
},
},
block_txs
:
{
block_txs
:
{
path
:
'
/api/v2/blocks/:height/transactions
'
,
path
:
'
/api/v2/blocks/:height
_or_hash
/transactions
'
,
pathParams
:
[
'
height
'
as
const
],
pathParams
:
[
'
height
_or_hash
'
as
const
],
paginationFields
:
[
'
block_number
'
as
const
,
'
items_count
'
as
const
,
'
index
'
as
const
],
paginationFields
:
[
'
block_number
'
as
const
,
'
items_count
'
as
const
,
'
index
'
as
const
],
filterFields
:
[],
filterFields
:
[],
},
},
block_withdrawals
:
{
block_withdrawals
:
{
path
:
'
/api/v2/blocks/:height/withdrawals
'
,
path
:
'
/api/v2/blocks/:height
_or_hash
/withdrawals
'
,
pathParams
:
[
'
height
'
as
const
],
pathParams
:
[
'
height
_or_hash
'
as
const
],
paginationFields
:
[
'
items_count
'
as
const
,
'
index
'
as
const
],
paginationFields
:
[
'
items_count
'
as
const
,
'
index
'
as
const
],
filterFields
:
[],
filterFields
:
[],
},
},
...
...
lib/hooks/useNavItems.tsx
View file @
db52d2cf
...
@@ -62,7 +62,7 @@ export default function useNavItems(): ReturnType {
...
@@ -62,7 +62,7 @@ export default function useNavItems(): ReturnType {
text
:
'
Blocks
'
,
text
:
'
Blocks
'
,
nextRoute
:
{
pathname
:
'
/blocks
'
as
const
},
nextRoute
:
{
pathname
:
'
/blocks
'
as
const
},
icon
:
blocksIcon
,
icon
:
blocksIcon
,
isActive
:
pathname
===
'
/blocks
'
||
pathname
===
'
/block/[height]
'
,
isActive
:
pathname
===
'
/blocks
'
||
pathname
===
'
/block/[height
_or_hash
]
'
,
};
};
const
txs
=
{
const
txs
=
{
text
:
'
Transactions
'
,
text
:
'
Transactions
'
,
...
...
lib/mixpanel/getPageType.ts
View file @
db52d2cf
...
@@ -5,7 +5,7 @@ const PAGE_TYPE_DICT: Record<Route['pathname'], string> = {
...
@@ -5,7 +5,7 @@ const PAGE_TYPE_DICT: Record<Route['pathname'], string> = {
'
/txs
'
:
'
Transactions
'
,
'
/txs
'
:
'
Transactions
'
,
'
/tx/[hash]
'
:
'
Transaction details
'
,
'
/tx/[hash]
'
:
'
Transaction details
'
,
'
/blocks
'
:
'
Blocks
'
,
'
/blocks
'
:
'
Blocks
'
,
'
/block/[height]
'
:
'
Block details
'
,
'
/block/[height
_or_hash
]
'
:
'
Block details
'
,
'
/accounts
'
:
'
Top accounts
'
,
'
/accounts
'
:
'
Top accounts
'
,
'
/address/[hash]
'
:
'
Address details
'
,
'
/address/[hash]
'
:
'
Address details
'
,
'
/verified-contracts
'
:
'
Verified contracts
'
,
'
/verified-contracts
'
:
'
Verified contracts
'
,
...
...
lib/next/block/getSeo.ts
View file @
db52d2cf
...
@@ -2,11 +2,14 @@ import type { RoutedQuery } from 'nextjs-routes';
...
@@ -2,11 +2,14 @@ import type { RoutedQuery } from 'nextjs-routes';
import
getNetworkTitle
from
'
lib/networks/getNetworkTitle
'
;
import
getNetworkTitle
from
'
lib/networks/getNetworkTitle
'
;
export
default
function
getSeo
(
params
?:
RoutedQuery
<
'
/block/[height]
'
>
)
{
export
default
function
getSeo
(
params
?:
RoutedQuery
<
'
/block/[height
_or_hash
]
'
>
)
{
const
networkTitle
=
getNetworkTitle
();
const
networkTitle
=
getNetworkTitle
();
const
isHash
=
params
?
params
.
height_or_hash
.
startsWith
(
'
0x
'
)
:
false
;
return
{
return
{
title
:
params
?
`Block
${
params
.
height
}
-
${
networkTitle
}
`
:
''
,
title
:
params
?
`Block
${
params
.
height_or_hash
}
-
${
networkTitle
}
`
:
''
,
description
:
params
?
`View the transactions, token transfers, and uncles for block number
${
params
.
height
}
`
:
''
,
description
:
params
?
`View the transactions, token transfers, and uncles for block
${
isHash
?
''
:
'
number
'
}${
params
.
height_or_hash
}
`
:
''
,
};
};
}
}
lib/next/getServerSideProps.ts
View file @
db52d2cf
...
@@ -14,8 +14,8 @@ export const getServerSideProps: GetServerSideProps<Props> = async({ req, query
...
@@ -14,8 +14,8 @@ export const getServerSideProps: GetServerSideProps<Props> = async({ req, query
cookies
:
req
.
headers
.
cookie
||
''
,
cookies
:
req
.
headers
.
cookie
||
''
,
referrer
:
req
.
headers
.
referer
||
''
,
referrer
:
req
.
headers
.
referer
||
''
,
id
:
query
.
id
?.
toString
()
||
''
,
id
:
query
.
id
?.
toString
()
||
''
,
height
:
query
.
height
?.
toString
()
||
''
,
hash
:
query
.
hash
?.
toString
()
||
''
,
hash
:
query
.
hash
?.
toString
()
||
''
,
height_or_hash
:
query
.
height_or_hash
?.
toString
()
||
''
,
},
},
};
};
};
};
pages/block/[height].tsx
→
pages/block/[height
_or_hash
].tsx
View file @
db52d2cf
...
@@ -9,8 +9,8 @@ import Page from 'ui/shared/Page/Page';
...
@@ -9,8 +9,8 @@ import Page from 'ui/shared/Page/Page';
const
Block
=
dynamic
(()
=>
import
(
'
ui/pages/Block
'
),
{
ssr
:
false
});
const
Block
=
dynamic
(()
=>
import
(
'
ui/pages/Block
'
),
{
ssr
:
false
});
const
BlockPage
:
NextPage
<
RoutedQuery
<
'
/block/[height
]
'
>>
=
({
height
}:
RoutedQuery
<
'
/block/[height
]
'
>
)
=>
{
const
BlockPage
:
NextPage
<
RoutedQuery
<
'
/block/[height
_or_hash]
'
>>
=
(
params
:
RoutedQuery
<
'
/block/[height_or_hash
]
'
>
)
=>
{
const
{
title
,
description
}
=
getSeo
({
height
});
const
{
title
,
description
}
=
getSeo
({
height
_or_hash
:
params
.
height_or_hash
});
return
(
return
(
<>
<>
<
Head
>
<
Head
>
...
...
types/nextjs-routes.d.ts
View file @
db52d2cf
...
@@ -23,7 +23,7 @@ declare module "nextjs-routes" {
...
@@ -23,7 +23,7 @@ declare module "nextjs-routes" {
|
StaticRoute
<
"
/apps
"
>
|
StaticRoute
<
"
/apps
"
>
|
StaticRoute
<
"
/auth/auth0
"
>
|
StaticRoute
<
"
/auth/auth0
"
>
|
StaticRoute
<
"
/auth/profile
"
>
|
StaticRoute
<
"
/auth/profile
"
>
|
DynamicRoute
<
"
/block/[height
]
"
,
{
"
height
"
:
string
}
>
|
DynamicRoute
<
"
/block/[height
_or_hash]
"
,
{
"
height_or_hash
"
:
string
}
>
|
StaticRoute
<
"
/blocks
"
>
|
StaticRoute
<
"
/blocks
"
>
|
StaticRoute
<
"
/csv-export
"
>
|
StaticRoute
<
"
/csv-export
"
>
|
StaticRoute
<
"
/graphiql
"
>
|
StaticRoute
<
"
/graphiql
"
>
...
...
ui/address/AddressDetails.tsx
View file @
db52d2cf
...
@@ -210,7 +210,7 @@ const AddressDetails = ({ addressQuery, scrollRef }: Props) => {
...
@@ -210,7 +210,7 @@ const AddressDetails = ({ addressQuery, scrollRef }: Props) => {
isLoading=
{
addressQuery
.
isPlaceholderData
}
isLoading=
{
addressQuery
.
isPlaceholderData
}
>
>
<
LinkInternal
<
LinkInternal
href=
{
route
({
pathname
:
'
/block/[height
]
'
,
query
:
{
height
:
String
(
data
.
block_number_balance_updated_at
)
}
})
}
href=
{
route
({
pathname
:
'
/block/[height
_or_hash]
'
,
query
:
{
height_or_hash
:
String
(
data
.
block_number_balance_updated_at
)
}
})
}
display=
"flex"
display=
"flex"
alignItems=
"center"
alignItems=
"center"
>
>
...
...
ui/address/blocksValidated/AddressBlocksValidatedListItem.tsx
View file @
db52d2cf
...
@@ -18,7 +18,7 @@ type Props = Block & {
...
@@ -18,7 +18,7 @@ type Props = Block & {
};
};
const
AddressBlocksValidatedListItem
=
(
props
:
Props
)
=>
{
const
AddressBlocksValidatedListItem
=
(
props
:
Props
)
=>
{
const
blockUrl
=
route
({
pathname
:
'
/block/[height
]
'
,
query
:
{
height
:
props
.
height
.
toString
()
}
});
const
blockUrl
=
route
({
pathname
:
'
/block/[height
_or_hash]
'
,
query
:
{
height_or_hash
:
props
.
height
.
toString
()
}
});
const
timeAgo
=
useTimeAgoIncrement
(
props
.
timestamp
,
props
.
page
===
1
);
const
timeAgo
=
useTimeAgoIncrement
(
props
.
timestamp
,
props
.
page
===
1
);
const
totalReward
=
getBlockTotalReward
(
props
);
const
totalReward
=
getBlockTotalReward
(
props
);
...
...
ui/address/blocksValidated/AddressBlocksValidatedTableItem.tsx
View file @
db52d2cf
...
@@ -16,7 +16,7 @@ type Props = Block & {
...
@@ -16,7 +16,7 @@ type Props = Block & {
};
};
const
AddressBlocksValidatedTableItem
=
(
props
:
Props
)
=>
{
const
AddressBlocksValidatedTableItem
=
(
props
:
Props
)
=>
{
const
blockUrl
=
route
({
pathname
:
'
/block/[height
]
'
,
query
:
{
height
:
String
(
props
.
height
)
}
});
const
blockUrl
=
route
({
pathname
:
'
/block/[height
_or_hash]
'
,
query
:
{
height_or_hash
:
String
(
props
.
height
)
}
});
const
timeAgo
=
useTimeAgoIncrement
(
props
.
timestamp
,
props
.
page
===
1
);
const
timeAgo
=
useTimeAgoIncrement
(
props
.
timestamp
,
props
.
page
===
1
);
const
totalReward
=
getBlockTotalReward
(
props
);
const
totalReward
=
getBlockTotalReward
(
props
);
...
...
ui/address/coinBalance/AddressCoinBalanceListItem.tsx
View file @
db52d2cf
...
@@ -19,7 +19,7 @@ type Props = AddressCoinBalanceHistoryItem & {
...
@@ -19,7 +19,7 @@ type Props = AddressCoinBalanceHistoryItem & {
};
};
const
AddressCoinBalanceListItem
=
(
props
:
Props
)
=>
{
const
AddressCoinBalanceListItem
=
(
props
:
Props
)
=>
{
const
blockUrl
=
route
({
pathname
:
'
/block/[height
]
'
,
query
:
{
height
:
String
(
props
.
block_number
)
}
});
const
blockUrl
=
route
({
pathname
:
'
/block/[height
_or_hash]
'
,
query
:
{
height_or_hash
:
String
(
props
.
block_number
)
}
});
const
deltaBn
=
BigNumber
(
props
.
delta
).
div
(
WEI
);
const
deltaBn
=
BigNumber
(
props
.
delta
).
div
(
WEI
);
const
isPositiveDelta
=
deltaBn
.
gte
(
ZERO
);
const
isPositiveDelta
=
deltaBn
.
gte
(
ZERO
);
const
timeAgo
=
useTimeAgoIncrement
(
props
.
block_timestamp
,
props
.
page
===
1
);
const
timeAgo
=
useTimeAgoIncrement
(
props
.
block_timestamp
,
props
.
page
===
1
);
...
...
ui/address/coinBalance/AddressCoinBalanceTableItem.tsx
View file @
db52d2cf
...
@@ -17,7 +17,7 @@ type Props = AddressCoinBalanceHistoryItem & {
...
@@ -17,7 +17,7 @@ type Props = AddressCoinBalanceHistoryItem & {
};
};
const
AddressCoinBalanceTableItem
=
(
props
:
Props
)
=>
{
const
AddressCoinBalanceTableItem
=
(
props
:
Props
)
=>
{
const
blockUrl
=
route
({
pathname
:
'
/block/[height
]
'
,
query
:
{
height
:
String
(
props
.
block_number
)
}
});
const
blockUrl
=
route
({
pathname
:
'
/block/[height
_or_hash]
'
,
query
:
{
height_or_hash
:
String
(
props
.
block_number
)
}
});
const
deltaBn
=
BigNumber
(
props
.
delta
).
div
(
WEI
);
const
deltaBn
=
BigNumber
(
props
.
delta
).
div
(
WEI
);
const
isPositiveDelta
=
deltaBn
.
gte
(
ZERO
);
const
isPositiveDelta
=
deltaBn
.
gte
(
ZERO
);
const
timeAgo
=
useTimeAgoIncrement
(
props
.
block_timestamp
,
props
.
page
===
1
);
const
timeAgo
=
useTimeAgoIncrement
(
props
.
block_timestamp
,
props
.
page
===
1
);
...
...
ui/address/internals/AddressIntTxsListItem.tsx
View file @
db52d2cf
...
@@ -57,7 +57,7 @@ const TxInternalsListItem = ({
...
@@ -57,7 +57,7 @@ const TxInternalsListItem = ({
<
HStack
spacing=
{
1
}
>
<
HStack
spacing=
{
1
}
>
<
Skeleton
isLoaded=
{
!
isLoading
}
fontSize=
"sm"
fontWeight=
{
500
}
>
Block
</
Skeleton
>
<
Skeleton
isLoaded=
{
!
isLoading
}
fontSize=
"sm"
fontWeight=
{
500
}
>
Block
</
Skeleton
>
<
Skeleton
isLoaded=
{
!
isLoading
}
>
<
Skeleton
isLoaded=
{
!
isLoading
}
>
<
LinkInternal
href=
{
route
({
pathname
:
'
/block/[height
]
'
,
query
:
{
height
:
block
.
toString
()
}
})
}
>
{
block
}
</
LinkInternal
>
<
LinkInternal
href=
{
route
({
pathname
:
'
/block/[height
_or_hash]
'
,
query
:
{
height_or_hash
:
block
.
toString
()
}
})
}
>
{
block
}
</
LinkInternal
>
</
Skeleton
>
</
Skeleton
>
</
HStack
>
</
HStack
>
<
Box
w=
"100%"
display=
"flex"
columnGap=
{
3
}
>
<
Box
w=
"100%"
display=
"flex"
columnGap=
{
3
}
>
...
...
ui/address/internals/AddressIntTxsTableItem.tsx
View file @
db52d2cf
...
@@ -67,7 +67,7 @@ const AddressIntTxsTableItem = ({
...
@@ -67,7 +67,7 @@ const AddressIntTxsTableItem = ({
</
Td
>
</
Td
>
<
Td
verticalAlign=
"middle"
>
<
Td
verticalAlign=
"middle"
>
<
Skeleton
isLoaded=
{
!
isLoading
}
display=
"inline-block"
>
<
Skeleton
isLoaded=
{
!
isLoading
}
display=
"inline-block"
>
<
LinkInternal
href=
{
route
({
pathname
:
'
/block/[height
]
'
,
query
:
{
height
:
block
.
toString
()
}
})
}
>
<
LinkInternal
href=
{
route
({
pathname
:
'
/block/[height
_or_hash]
'
,
query
:
{
height_or_hash
:
block
.
toString
()
}
})
}
>
{
block
}
{
block
}
</
LinkInternal
>
</
LinkInternal
>
</
Skeleton
>
</
Skeleton
>
...
...
ui/block/BlockDetails.tsx
View file @
db52d2cf
...
@@ -38,7 +38,7 @@ interface Props {
...
@@ -38,7 +38,7 @@ interface Props {
const
BlockDetails
=
({
query
}:
Props
)
=>
{
const
BlockDetails
=
({
query
}:
Props
)
=>
{
const
[
isExpanded
,
setIsExpanded
]
=
React
.
useState
(
false
);
const
[
isExpanded
,
setIsExpanded
]
=
React
.
useState
(
false
);
const
router
=
useRouter
();
const
router
=
useRouter
();
const
heightOrHash
=
getQueryParamString
(
router
.
query
.
height
);
const
heightOrHash
=
getQueryParamString
(
router
.
query
.
height
_or_hash
);
const
separatorColor
=
useColorModeValue
(
'
gray.200
'
,
'
gray.700
'
);
const
separatorColor
=
useColorModeValue
(
'
gray.200
'
,
'
gray.700
'
);
...
@@ -60,7 +60,7 @@ const BlockDetails = ({ query }: Props) => {
...
@@ -60,7 +60,7 @@ const BlockDetails = ({ query }: Props) => {
const
increment
=
direction
===
'
next
'
?
+
1
:
-
1
;
const
increment
=
direction
===
'
next
'
?
+
1
:
-
1
;
const
nextId
=
String
(
data
.
height
+
increment
);
const
nextId
=
String
(
data
.
height
+
increment
);
router
.
push
({
pathname
:
'
/block/[height
]
'
,
query
:
{
height
:
nextId
}
},
undefined
);
router
.
push
({
pathname
:
'
/block/[height
_or_hash]
'
,
query
:
{
height_or_hash
:
nextId
}
},
undefined
);
},
[
data
,
router
]);
},
[
data
,
router
]);
if
(
isError
)
{
if
(
isError
)
{
...
@@ -175,7 +175,7 @@ const BlockDetails = ({ query }: Props) => {
...
@@ -175,7 +175,7 @@ const BlockDetails = ({ query }: Props) => {
isLoading=
{
isPlaceholderData
}
isLoading=
{
isPlaceholderData
}
>
>
<
Skeleton
isLoaded=
{
!
isPlaceholderData
}
>
<
Skeleton
isLoaded=
{
!
isPlaceholderData
}
>
<
LinkInternal
href=
{
route
({
pathname
:
'
/block/[height
]
'
,
query
:
{
height
:
heightOrHash
,
tab
:
'
txs
'
}
})
}
>
<
LinkInternal
href=
{
route
({
pathname
:
'
/block/[height
_or_hash]
'
,
query
:
{
height_or_hash
:
heightOrHash
,
tab
:
'
txs
'
}
})
}
>
{
data
.
tx_count
}
transaction
{
data
.
tx_count
===
1
?
''
:
'
s
'
}
{
data
.
tx_count
}
transaction
{
data
.
tx_count
===
1
?
''
:
'
s
'
}
</
LinkInternal
>
</
LinkInternal
>
</
Skeleton
>
</
Skeleton
>
...
...
ui/blocks/BlocksListItem.tsx
View file @
db52d2cf
...
@@ -40,7 +40,10 @@ const BlocksListItem = ({ data, isLoading, enableTimeIncrement }: Props) => {
...
@@ -40,7 +40,10 @@ const BlocksListItem = ({ data, isLoading, enableTimeIncrement }: Props) => {
<
Skeleton
isLoaded=
{
!
isLoading
}
display=
"inline-block"
>
<
Skeleton
isLoaded=
{
!
isLoading
}
display=
"inline-block"
>
<
LinkInternal
<
LinkInternal
fontWeight=
{
600
}
fontWeight=
{
600
}
href=
{
route
({
pathname
:
'
/block/[height]
'
,
query
:
{
height
:
data
.
type
===
'
reorg
'
?
String
(
data
.
hash
)
:
String
(
data
.
height
)
}
})
}
href=
{
route
({
pathname
:
'
/block/[height_or_hash]
'
,
query
:
{
height_or_hash
:
data
.
type
===
'
reorg
'
?
String
(
data
.
hash
)
:
String
(
data
.
height
)
},
})
}
>
>
{
data
.
height
}
{
data
.
height
}
</
LinkInternal
>
</
LinkInternal
>
...
@@ -62,7 +65,7 @@ const BlocksListItem = ({ data, isLoading, enableTimeIncrement }: Props) => {
...
@@ -62,7 +65,7 @@ const BlocksListItem = ({ data, isLoading, enableTimeIncrement }: Props) => {
<
Text
fontWeight=
{
500
}
>
Txn
</
Text
>
<
Text
fontWeight=
{
500
}
>
Txn
</
Text
>
{
data
.
tx_count
>
0
?
(
{
data
.
tx_count
>
0
?
(
<
Skeleton
isLoaded=
{
!
isLoading
}
display=
"inline-block"
>
<
Skeleton
isLoaded=
{
!
isLoading
}
display=
"inline-block"
>
<
LinkInternal
href=
{
route
({
pathname
:
'
/block/[height
]
'
,
query
:
{
height
:
String
(
data
.
height
),
tab
:
'
txs
'
}
})
}
>
<
LinkInternal
href=
{
route
({
pathname
:
'
/block/[height
_or_hash]
'
,
query
:
{
height_or_hash
:
String
(
data
.
height
),
tab
:
'
txs
'
}
})
}
>
{
data
.
tx_count
}
{
data
.
tx_count
}
</
LinkInternal
>
</
LinkInternal
>
</
Skeleton
>
</
Skeleton
>
...
...
ui/blocks/BlocksTableItem.tsx
View file @
db52d2cf
...
@@ -47,7 +47,10 @@ const BlocksTableItem = ({ data, isLoading, enableTimeIncrement }: Props) => {
...
@@ -47,7 +47,10 @@ const BlocksTableItem = ({ data, isLoading, enableTimeIncrement }: Props) => {
<
Skeleton
isLoaded=
{
!
isLoading
}
display=
"inline-block"
>
<
Skeleton
isLoaded=
{
!
isLoading
}
display=
"inline-block"
>
<
LinkInternal
<
LinkInternal
fontWeight=
{
600
}
fontWeight=
{
600
}
href=
{
route
({
pathname
:
'
/block/[height]
'
,
query
:
{
height
:
data
.
type
===
'
reorg
'
?
String
(
data
.
hash
)
:
String
(
data
.
height
)
}
})
}
href=
{
route
({
pathname
:
'
/block/[height_or_hash]
'
,
query
:
{
height_or_hash
:
data
.
type
===
'
reorg
'
?
String
(
data
.
hash
)
:
String
(
data
.
height
)
},
})
}
>
>
{
data
.
height
}
{
data
.
height
}
</
LinkInternal
>
</
LinkInternal
>
...
@@ -75,7 +78,10 @@ const BlocksTableItem = ({ data, isLoading, enableTimeIncrement }: Props) => {
...
@@ -75,7 +78,10 @@ const BlocksTableItem = ({ data, isLoading, enableTimeIncrement }: Props) => {
<
Td
isNumeric
fontSize=
"sm"
>
<
Td
isNumeric
fontSize=
"sm"
>
{
data
.
tx_count
>
0
?
(
{
data
.
tx_count
>
0
?
(
<
Skeleton
isLoaded=
{
!
isLoading
}
display=
"inline-block"
>
<
Skeleton
isLoaded=
{
!
isLoading
}
display=
"inline-block"
>
<
LinkInternal
href=
{
route
({
pathname
:
'
/block/[height]
'
,
query
:
{
height
:
String
(
data
.
height
),
tab
:
'
txs
'
}
})
}
>
<
LinkInternal
href=
{
route
({
pathname
:
'
/block/[height_or_hash]
'
,
query
:
{
height_or_hash
:
String
(
data
.
height
),
tab
:
'
txs
'
},
})
}
>
{
data
.
tx_count
}
{
data
.
tx_count
}
</
LinkInternal
>
</
LinkInternal
>
</
Skeleton
>
</
Skeleton
>
...
...
ui/home/LatestBlocksItem.tsx
View file @
db52d2cf
...
@@ -45,7 +45,7 @@ const LatestBlocksItem = ({ block, h }: Props) => {
...
@@ -45,7 +45,7 @@ const LatestBlocksItem = ({ block, h }: Props) => {
<
HStack
spacing=
{
2
}
>
<
HStack
spacing=
{
2
}
>
<
Icon
as=
{
blockIcon
}
boxSize=
"30px"
color=
"link"
/>
<
Icon
as=
{
blockIcon
}
boxSize=
"30px"
color=
"link"
/>
<
LinkInternal
<
LinkInternal
href=
{
route
({
pathname
:
'
/block/[height
]
'
,
query
:
{
height
:
String
(
block
.
height
)
}
})
}
href=
{
route
({
pathname
:
'
/block/[height
_or_hash]
'
,
query
:
{
height_or_hash
:
String
(
block
.
height
)
}
})
}
fontSize=
"xl"
fontSize=
"xl"
fontWeight=
"500"
fontWeight=
"500"
>
>
...
...
ui/home/LatestDepositsItem.tsx
View file @
db52d2cf
...
@@ -29,7 +29,9 @@ const LatestTxsItem = ({ item }: Props) => {
...
@@ -29,7 +29,9 @@ const LatestTxsItem = ({ item }: Props) => {
const
l1BlockLink
=
(
const
l1BlockLink
=
(
<
LinkExternal
<
LinkExternal
href=
{
appConfig
.
L2
.
L1BaseUrl
+
route
({
pathname
:
'
/block/[height]
'
,
query
:
{
height
:
item
.
l1_block_number
.
toString
()
}
})
}
href=
{
appConfig
.
L2
.
L1BaseUrl
+
route
({
pathname
:
'
/block/[height_or_hash]
'
,
query
:
{
height_or_hash
:
item
.
l1_block_number
.
toString
()
}
})
}
fontWeight=
{
700
}
fontWeight=
{
700
}
display=
"inline-flex"
display=
"inline-flex"
mr=
{
2
}
mr=
{
2
}
...
...
ui/l2Deposits/DepositsListItem.tsx
View file @
db52d2cf
...
@@ -26,7 +26,7 @@ const DepositsListItem = ({ item }: Props) => {
...
@@ -26,7 +26,7 @@ const DepositsListItem = ({ item }: Props) => {
<
ListItemMobileGrid
.
Label
>
L1 block No
</
ListItemMobileGrid
.
Label
>
<
ListItemMobileGrid
.
Label
>
L1 block No
</
ListItemMobileGrid
.
Label
>
<
ListItemMobileGrid
.
Value
>
<
ListItemMobileGrid
.
Value
>
<
LinkExternal
<
LinkExternal
href=
{
appConfig
.
L2
.
L1BaseUrl
+
route
({
pathname
:
'
/block/[height
]
'
,
query
:
{
height
:
item
.
l1_block_number
.
toString
()
}
})
}
href=
{
appConfig
.
L2
.
L1BaseUrl
+
route
({
pathname
:
'
/block/[height
_or_hash]
'
,
query
:
{
height_or_hash
:
item
.
l1_block_number
.
toString
()
}
})
}
fontWeight=
{
600
}
fontWeight=
{
600
}
display=
"inline-flex"
display=
"inline-flex"
>
>
...
...
ui/l2Deposits/DepositsTableItem.tsx
View file @
db52d2cf
...
@@ -23,7 +23,7 @@ const WithdrawalsTableItem = ({ item }: Props) => {
...
@@ -23,7 +23,7 @@ const WithdrawalsTableItem = ({ item }: Props) => {
<
Tr
>
<
Tr
>
<
Td
verticalAlign=
"middle"
fontWeight=
{
600
}
>
<
Td
verticalAlign=
"middle"
fontWeight=
{
600
}
>
<
LinkExternal
<
LinkExternal
href=
{
appConfig
.
L2
.
L1BaseUrl
+
route
({
pathname
:
'
/block/[height
]
'
,
query
:
{
height
:
item
.
l1_block_number
.
toString
()
}
})
}
href=
{
appConfig
.
L2
.
L1BaseUrl
+
route
({
pathname
:
'
/block/[height
_or_hash]
'
,
query
:
{
height_or_hash
:
item
.
l1_block_number
.
toString
()
}
})
}
fontWeight=
{
600
}
fontWeight=
{
600
}
display=
"inline-flex"
display=
"inline-flex"
>
>
...
...
ui/l2OutputRoots/OutputRootsListItem.tsx
View file @
db52d2cf
...
@@ -35,7 +35,7 @@ const OutputRootsListItem = ({ item }: Props) => {
...
@@ -35,7 +35,7 @@ const OutputRootsListItem = ({ item }: Props) => {
display=
"flex"
display=
"flex"
width=
"fit-content"
width=
"fit-content"
alignItems=
"center"
alignItems=
"center"
href=
{
route
({
pathname
:
'
/block/[height
]
'
,
query
:
{
height
:
item
.
l2_block_number
.
toString
()
}
})
}
href=
{
route
({
pathname
:
'
/block/[height
_or_hash]
'
,
query
:
{
height_or_hash
:
item
.
l2_block_number
.
toString
()
}
})
}
>
>
{
item
.
l2_block_number
}
{
item
.
l2_block_number
}
</
LinkInternal
>
</
LinkInternal
>
...
...
ui/l2OutputRoots/OutputRootsTableItem.tsx
View file @
db52d2cf
...
@@ -32,7 +32,7 @@ const OutputRootsTableItem = ({ item }: Props) => {
...
@@ -32,7 +32,7 @@ const OutputRootsTableItem = ({ item }: Props) => {
display=
"flex"
display=
"flex"
width=
"fit-content"
width=
"fit-content"
alignItems=
"center"
alignItems=
"center"
href=
{
route
({
pathname
:
'
/block/[height
]
'
,
query
:
{
height
:
item
.
l2_block_number
.
toString
()
}
})
}
href=
{
route
({
pathname
:
'
/block/[height
_or_hash]
'
,
query
:
{
height_or_hash
:
item
.
l2_block_number
.
toString
()
}
})
}
>
>
<
Icon
as=
{
txBatchIcon
}
boxSize=
{
6
}
mr=
{
1
}
/>
<
Icon
as=
{
txBatchIcon
}
boxSize=
{
6
}
mr=
{
1
}
/>
{
item
.
l2_block_number
}
{
item
.
l2_block_number
}
...
...
ui/l2TxnBatches/TxnBatchesListItem.tsx
View file @
db52d2cf
...
@@ -28,7 +28,7 @@ const TxnBatchesListItem = ({ item }: Props) => {
...
@@ -28,7 +28,7 @@ const TxnBatchesListItem = ({ item }: Props) => {
display=
"flex"
display=
"flex"
width=
"fit-content"
width=
"fit-content"
alignItems=
"center"
alignItems=
"center"
href=
{
route
({
pathname
:
'
/block/[height
]
'
,
query
:
{
height
:
item
.
l2_block_number
.
toString
()
}
})
}
href=
{
route
({
pathname
:
'
/block/[height
_or_hash]
'
,
query
:
{
height_or_hash
:
item
.
l2_block_number
.
toString
()
}
})
}
>
>
<
Icon
as=
{
txBatchIcon
}
boxSize=
{
6
}
mr=
{
1
}
/>
<
Icon
as=
{
txBatchIcon
}
boxSize=
{
6
}
mr=
{
1
}
/>
{
item
.
l2_block_number
}
{
item
.
l2_block_number
}
...
@@ -37,7 +37,7 @@ const TxnBatchesListItem = ({ item }: Props) => {
...
@@ -37,7 +37,7 @@ const TxnBatchesListItem = ({ item }: Props) => {
<
ListItemMobileGrid
.
Label
>
L2 block txn count
</
ListItemMobileGrid
.
Label
>
<
ListItemMobileGrid
.
Label
>
L2 block txn count
</
ListItemMobileGrid
.
Label
>
<
ListItemMobileGrid
.
Value
>
<
ListItemMobileGrid
.
Value
>
<
LinkInternal
href=
{
route
({
pathname
:
'
/block/[height
]
'
,
query
:
{
height
:
item
.
l2_block_number
.
toString
(),
tab
:
'
txs
'
}
})
}
>
<
LinkInternal
href=
{
route
({
pathname
:
'
/block/[height
_or_hash]
'
,
query
:
{
height_or_hash
:
item
.
l2_block_number
.
toString
(),
tab
:
'
txs
'
}
})
}
>
{
item
.
tx_count
}
{
item
.
tx_count
}
</
LinkInternal
>
</
LinkInternal
>
</
ListItemMobileGrid
.
Value
>
</
ListItemMobileGrid
.
Value
>
...
@@ -47,7 +47,7 @@ const TxnBatchesListItem = ({ item }: Props) => {
...
@@ -47,7 +47,7 @@ const TxnBatchesListItem = ({ item }: Props) => {
<
LinkExternal
<
LinkExternal
fontWeight=
{
600
}
fontWeight=
{
600
}
display=
"inline-flex"
display=
"inline-flex"
href=
{
appConfig
.
L2
.
L1BaseUrl
+
route
({
pathname
:
'
/block/[height
]
'
,
query
:
{
height
:
item
.
epoch_number
.
toString
()
}
})
}
href=
{
appConfig
.
L2
.
L1BaseUrl
+
route
({
pathname
:
'
/block/[height
_or_hash]
'
,
query
:
{
height_or_hash
:
item
.
epoch_number
.
toString
()
}
})
}
>
>
{
item
.
epoch_number
}
{
item
.
epoch_number
}
</
LinkExternal
>
</
LinkExternal
>
...
...
ui/l2TxnBatches/TxnBatchesTableItem.tsx
View file @
db52d2cf
...
@@ -25,7 +25,7 @@ const TxnBatchesTableItem = ({ item }: Props) => {
...
@@ -25,7 +25,7 @@ const TxnBatchesTableItem = ({ item }: Props) => {
display=
"flex"
display=
"flex"
width=
"fit-content"
width=
"fit-content"
alignItems=
"center"
alignItems=
"center"
href=
{
route
({
pathname
:
'
/block/[height
]
'
,
query
:
{
height
:
item
.
l2_block_number
.
toString
()
}
})
}
href=
{
route
({
pathname
:
'
/block/[height
_or_hash]
'
,
query
:
{
height_or_hash
:
item
.
l2_block_number
.
toString
()
}
})
}
>
>
<
Icon
as=
{
txBatchIcon
}
boxSize=
{
6
}
mr=
{
1
}
/>
<
Icon
as=
{
txBatchIcon
}
boxSize=
{
6
}
mr=
{
1
}
/>
{
item
.
l2_block_number
}
{
item
.
l2_block_number
}
...
@@ -33,7 +33,7 @@ const TxnBatchesTableItem = ({ item }: Props) => {
...
@@ -33,7 +33,7 @@ const TxnBatchesTableItem = ({ item }: Props) => {
</
Td
>
</
Td
>
<
Td
>
<
Td
>
<
LinkInternal
<
LinkInternal
href=
{
route
({
pathname
:
'
/block/[height
]
'
,
query
:
{
height
:
item
.
l2_block_number
.
toString
(),
tab
:
'
txs
'
}
})
}
href=
{
route
({
pathname
:
'
/block/[height
_or_hash]
'
,
query
:
{
height_or_hash
:
item
.
l2_block_number
.
toString
(),
tab
:
'
txs
'
}
})
}
lineHeight=
"24px"
lineHeight=
"24px"
>
>
{
item
.
tx_count
}
{
item
.
tx_count
}
...
@@ -41,7 +41,7 @@ const TxnBatchesTableItem = ({ item }: Props) => {
...
@@ -41,7 +41,7 @@ const TxnBatchesTableItem = ({ item }: Props) => {
</
Td
>
</
Td
>
<
Td
>
<
Td
>
<
LinkExternal
<
LinkExternal
href=
{
appConfig
.
L2
.
L1BaseUrl
+
route
({
pathname
:
'
/block/[height
]
'
,
query
:
{
height
:
item
.
epoch_number
.
toString
()
}
})
}
href=
{
appConfig
.
L2
.
L1BaseUrl
+
route
({
pathname
:
'
/block/[height
_or_hash]
'
,
query
:
{
height_or_hash
:
item
.
epoch_number
.
toString
()
}
})
}
fontWeight=
{
600
}
fontWeight=
{
600
}
lineHeight=
"24px"
lineHeight=
"24px"
display=
"inline-flex"
display=
"inline-flex"
...
...
ui/pages/Block.tsx
View file @
db52d2cf
...
@@ -34,20 +34,20 @@ const BlockPageContent = () => {
...
@@ -34,20 +34,20 @@ const BlockPageContent = () => {
const
router
=
useRouter
();
const
router
=
useRouter
();
const
isMobile
=
useIsMobile
();
const
isMobile
=
useIsMobile
();
const
appProps
=
useAppContext
();
const
appProps
=
useAppContext
();
const
height
=
getQueryParamString
(
router
.
query
.
height
);
const
height
OrHash
=
getQueryParamString
(
router
.
query
.
height_or_hash
);
const
tab
=
getQueryParamString
(
router
.
query
.
tab
);
const
tab
=
getQueryParamString
(
router
.
query
.
tab
);
const
blockQuery
=
useApiQuery
(
'
block
'
,
{
const
blockQuery
=
useApiQuery
(
'
block
'
,
{
pathParams
:
{
height
},
pathParams
:
{
height
_or_hash
:
heightOrHash
},
queryOptions
:
{
queryOptions
:
{
enabled
:
Boolean
(
height
),
enabled
:
Boolean
(
height
OrHash
),
placeholderData
:
BLOCK
,
placeholderData
:
BLOCK
,
},
},
});
});
const
blockTxsQuery
=
useQueryWithPages
({
const
blockTxsQuery
=
useQueryWithPages
({
resourceName
:
'
block_txs
'
,
resourceName
:
'
block_txs
'
,
pathParams
:
{
height
},
pathParams
:
{
height
_or_hash
:
heightOrHash
},
options
:
{
options
:
{
enabled
:
Boolean
(
!
blockQuery
.
isPlaceholderData
&&
blockQuery
.
data
?.
height
&&
tab
===
'
txs
'
),
enabled
:
Boolean
(
!
blockQuery
.
isPlaceholderData
&&
blockQuery
.
data
?.
height
&&
tab
===
'
txs
'
),
placeholderData
:
generateListStub
<
'
block_txs
'
>
(
TX
,
50
,
{
next_page_params
:
{
placeholderData
:
generateListStub
<
'
block_txs
'
>
(
TX
,
50
,
{
next_page_params
:
{
...
@@ -60,7 +60,7 @@ const BlockPageContent = () => {
...
@@ -60,7 +60,7 @@ const BlockPageContent = () => {
const
blockWithdrawalsQuery
=
useQueryWithPages
({
const
blockWithdrawalsQuery
=
useQueryWithPages
({
resourceName
:
'
block_withdrawals
'
,
resourceName
:
'
block_withdrawals
'
,
pathParams
:
{
height
},
pathParams
:
{
height
_or_hash
:
heightOrHash
},
options
:
{
options
:
{
enabled
:
Boolean
(
!
blockQuery
.
isPlaceholderData
&&
blockQuery
.
data
?.
height
&&
appConfig
.
beaconChain
.
hasBeaconChain
&&
tab
===
'
withdrawals
'
),
enabled
:
Boolean
(
!
blockQuery
.
isPlaceholderData
&&
blockQuery
.
data
?.
height
&&
appConfig
.
beaconChain
.
hasBeaconChain
&&
tab
===
'
withdrawals
'
),
placeholderData
:
generateListStub
<
'
block_withdrawals
'
>
(
WITHDRAWAL
,
50
,
{
next_page_params
:
{
placeholderData
:
generateListStub
<
'
block_withdrawals
'
>
(
WITHDRAWAL
,
50
,
{
next_page_params
:
{
...
@@ -70,7 +70,7 @@ const BlockPageContent = () => {
...
@@ -70,7 +70,7 @@ const BlockPageContent = () => {
},
},
});
});
if
(
!
height
)
{
if
(
!
height
OrHash
)
{
throw
new
Error
(
'
Block not found
'
,
{
cause
:
{
status
:
404
}
});
throw
new
Error
(
'
Block not found
'
,
{
cause
:
{
status
:
404
}
});
}
}
...
@@ -117,7 +117,7 @@ const BlockPageContent = () => {
...
@@ -117,7 +117,7 @@ const BlockPageContent = () => {
<
PageTitle
<
PageTitle
title=
{
`Block #${ blockQuery.data?.height }`
}
title=
{
`Block #${ blockQuery.data?.height }`
}
backLink=
{
backLink
}
backLink=
{
backLink
}
contentAfter=
{
<
NetworkExplorers
type=
"block"
pathParam=
{
height
}
ml=
{
{
base
:
'
initial
'
,
lg
:
'
auto
'
}
}
/>
}
contentAfter=
{
<
NetworkExplorers
type=
"block"
pathParam=
{
height
OrHash
}
ml=
{
{
base
:
'
initial
'
,
lg
:
'
auto
'
}
}
/>
}
isLoading=
{
blockQuery
.
isPlaceholderData
}
isLoading=
{
blockQuery
.
isPlaceholderData
}
/>
/>
{
blockQuery
.
isPlaceholderData
?
<
SkeletonTabs
tabs=
{
tabs
}
/>
:
(
{
blockQuery
.
isPlaceholderData
?
<
SkeletonTabs
tabs=
{
tabs
}
/>
:
(
...
...
ui/pages/SearchResults.tsx
View file @
db52d2cf
...
@@ -26,7 +26,7 @@ const SearchResultsPageContent = () => {
...
@@ -26,7 +26,7 @@ const SearchResultsPageContent = () => {
if
(
redirectCheckQuery
.
data
?.
redirect
&&
redirectCheckQuery
.
data
.
parameter
)
{
if
(
redirectCheckQuery
.
data
?.
redirect
&&
redirectCheckQuery
.
data
.
parameter
)
{
switch
(
redirectCheckQuery
.
data
.
type
)
{
switch
(
redirectCheckQuery
.
data
.
type
)
{
case
'
block
'
:
{
case
'
block
'
:
{
router
.
push
({
pathname
:
'
/block/[height
]
'
,
query
:
{
height
:
redirectCheckQuery
.
data
.
parameter
}
});
router
.
push
({
pathname
:
'
/block/[height
_or_hash]
'
,
query
:
{
height_or_hash
:
redirectCheckQuery
.
data
.
parameter
}
});
return
;
return
;
}
}
case
'
address
'
:
{
case
'
address
'
:
{
...
...
ui/searchResults/SearchResultListItem.tsx
View file @
db52d2cf
...
@@ -56,7 +56,7 @@ const SearchResultListItem = ({ data, searchTerm }: Props) => {
...
@@ -56,7 +56,7 @@ const SearchResultListItem = ({ data, searchTerm }: Props) => {
return
(
return
(
<
Flex
alignItems=
"center"
>
<
Flex
alignItems=
"center"
>
<
Icon
as=
{
blockIcon
}
boxSize=
{
6
}
mr=
{
2
}
color=
"gray.500"
/>
<
Icon
as=
{
blockIcon
}
boxSize=
{
6
}
mr=
{
2
}
color=
"gray.500"
/>
<
LinkInternal
fontWeight=
{
700
}
href=
{
route
({
pathname
:
'
/block/[height
]
'
,
query
:
{
height
:
String
(
data
.
block_number
)
}
})
}
>
<
LinkInternal
fontWeight=
{
700
}
href=
{
route
({
pathname
:
'
/block/[height
_or_hash]
'
,
query
:
{
height_or_hash
:
String
(
data
.
block_hash
)
}
})
}
>
<
Box
as=
{
shouldHighlightHash
?
'
span
'
:
'
mark
'
}
>
{
data
.
block_number
}
</
Box
>
<
Box
as=
{
shouldHighlightHash
?
'
span
'
:
'
mark
'
}
>
{
data
.
block_number
}
</
Box
>
</
LinkInternal
>
</
LinkInternal
>
</
Flex
>
</
Flex
>
...
...
ui/searchResults/SearchResultTableItem.tsx
View file @
db52d2cf
...
@@ -93,7 +93,7 @@ const SearchResultTableItem = ({ data, searchTerm }: Props) => {
...
@@ -93,7 +93,7 @@ const SearchResultTableItem = ({ data, searchTerm }: Props) => {
<
Td
fontSize=
"sm"
>
<
Td
fontSize=
"sm"
>
<
Flex
alignItems=
"center"
>
<
Flex
alignItems=
"center"
>
<
Icon
as=
{
blockIcon
}
boxSize=
{
6
}
mr=
{
2
}
color=
"gray.500"
/>
<
Icon
as=
{
blockIcon
}
boxSize=
{
6
}
mr=
{
2
}
color=
"gray.500"
/>
<
LinkInternal
fontWeight=
{
700
}
href=
{
route
({
pathname
:
'
/block/[height
]
'
,
query
:
{
height
:
String
(
data
.
block_number
)
}
})
}
>
<
LinkInternal
fontWeight=
{
700
}
href=
{
route
({
pathname
:
'
/block/[height
_or_hash]
'
,
query
:
{
height_or_hash
:
String
(
data
.
block_hash
)
}
})
}
>
<
Box
as=
{
shouldHighlightHash
?
'
span
'
:
'
mark
'
}
>
{
data
.
block_number
}
</
Box
>
<
Box
as=
{
shouldHighlightHash
?
'
span
'
:
'
mark
'
}
>
{
data
.
block_number
}
</
Box
>
</
LinkInternal
>
</
LinkInternal
>
</
Flex
>
</
Flex
>
...
...
ui/shared/AppError/AppErrorBlockConsensus.tsx
View file @
db52d2cf
...
@@ -19,7 +19,7 @@ const AppErrorBlockConsensus = ({ hash, className }: Props) => {
...
@@ -19,7 +19,7 @@ const AppErrorBlockConsensus = ({ hash, className }: Props) => {
size=
"lg"
size=
"lg"
variant=
"outline"
variant=
"outline"
as=
"a"
as=
"a"
href=
{
hash
?
route
({
pathname
:
'
/block/[height
]
'
,
query
:
{
height
:
hash
}
})
:
route
({
pathname
:
'
/
'
})
}
href=
{
hash
?
route
({
pathname
:
'
/block/[height
_or_hash]
'
,
query
:
{
height_or_hash
:
hash
}
})
:
route
({
pathname
:
'
/
'
})
}
>
>
{
hash
?
'
View reorg
'
:
'
Back to home
'
}
{
hash
?
'
View reorg
'
:
'
Back to home
'
}
</
Button
>
</
Button
>
...
...
ui/shared/address/AddressLink.tsx
View file @
db52d2cf
...
@@ -49,7 +49,7 @@ const AddressLink = (props: Props) => {
...
@@ -49,7 +49,7 @@ const AddressLink = (props: Props) => {
}
else
if
(
type
===
'
token
'
)
{
}
else
if
(
type
===
'
token
'
)
{
url
=
route
({
pathname
:
'
/token/[hash]
'
,
query
:
{
hash
}
});
url
=
route
({
pathname
:
'
/token/[hash]
'
,
query
:
{
hash
}
});
}
else
if
(
type
===
'
block
'
)
{
}
else
if
(
type
===
'
block
'
)
{
url
=
route
({
pathname
:
'
/block/[height
]
'
,
query
:
{
height
:
props
.
blockHeight
}
});
url
=
route
({
pathname
:
'
/block/[height
_or_hash]
'
,
query
:
{
height_or_hash
:
props
.
blockHeight
}
});
}
else
if
(
type
===
'
address_token
'
)
{
}
else
if
(
type
===
'
address_token
'
)
{
url
=
route
({
pathname
:
'
/address/[hash]
'
,
query
:
{
hash
,
tab
:
'
token_transfers
'
,
token
:
props
.
tokenHash
,
scroll_to_tabs
:
'
true
'
}
});
url
=
route
({
pathname
:
'
/address/[hash]
'
,
query
:
{
hash
,
tab
:
'
token_transfers
'
,
token
:
props
.
tokenHash
,
scroll_to_tabs
:
'
true
'
}
});
}
else
{
}
else
{
...
...
ui/snippets/searchBar/SearchBarSuggestItem.tsx
View file @
db52d2cf
...
@@ -35,7 +35,7 @@ const SearchBarSuggestItem = ({ data, isMobile, searchTerm, onClick }: Props) =>
...
@@ -35,7 +35,7 @@ const SearchBarSuggestItem = ({ data, isMobile, searchTerm, onClick }: Props) =>
return
route
({
pathname
:
'
/tx/[hash]
'
,
query
:
{
hash
:
data
.
tx_hash
}
});
return
route
({
pathname
:
'
/tx/[hash]
'
,
query
:
{
hash
:
data
.
tx_hash
}
});
}
}
case
'
block
'
:
{
case
'
block
'
:
{
return
route
({
pathname
:
'
/block/[height
]
'
,
query
:
{
height
:
String
(
data
.
block_number
)
}
});
return
route
({
pathname
:
'
/block/[height
_or_hash]
'
,
query
:
{
height_or_hash
:
String
(
data
.
block_hash
)
}
});
}
}
}
}
})();
})();
...
...
ui/tx/TxDetails.tsx
View file @
db52d2cf
...
@@ -163,7 +163,7 @@ const TxDetails = () => {
...
@@ -163,7 +163,7 @@ const TxDetails = () => {
{
data
.
block
===
null
?
{
data
.
block
===
null
?
<
Text
>
Pending
</
Text
>
:
(
<
Text
>
Pending
</
Text
>
:
(
<
Skeleton
isLoaded=
{
!
isPlaceholderData
}
>
<
Skeleton
isLoaded=
{
!
isPlaceholderData
}
>
<
LinkInternal
href=
{
route
({
pathname
:
'
/block/[height
]
'
,
query
:
{
height
:
String
(
data
.
block
)
}
})
}
>
<
LinkInternal
href=
{
route
({
pathname
:
'
/block/[height
_or_hash]
'
,
query
:
{
height_or_hash
:
String
(
data
.
block
)
}
})
}
>
{
data
.
block
}
{
data
.
block
}
</
LinkInternal
>
</
LinkInternal
>
</
Skeleton
>
</
Skeleton
>
...
...
ui/txs/TxsListItem.tsx
View file @
db52d2cf
...
@@ -96,7 +96,7 @@ const TxsListItem = ({ tx, isLoading, showBlockInfo, currentAddress, enableTimeI
...
@@ -96,7 +96,7 @@ const TxsListItem = ({ tx, isLoading, showBlockInfo, currentAddress, enableTimeI
<
Box
mt=
{
2
}
>
<
Box
mt=
{
2
}
>
<
Skeleton
isLoaded=
{
!
isLoading
}
display=
"inline-block"
whiteSpace=
"pre"
>
Block
</
Skeleton
>
<
Skeleton
isLoaded=
{
!
isLoading
}
display=
"inline-block"
whiteSpace=
"pre"
>
Block
</
Skeleton
>
<
Skeleton
isLoaded=
{
!
isLoading
}
display=
"inline-block"
>
<
Skeleton
isLoaded=
{
!
isLoading
}
display=
"inline-block"
>
<
LinkInternal
href=
{
route
({
pathname
:
'
/block/[height
]
'
,
query
:
{
height
:
tx
.
block
.
toString
()
}
})
}
>
{
tx
.
block
}
</
LinkInternal
>
<
LinkInternal
href=
{
route
({
pathname
:
'
/block/[height
_or_hash]
'
,
query
:
{
height_or_hash
:
tx
.
block
.
toString
()
}
})
}
>
{
tx
.
block
}
</
LinkInternal
>
</
Skeleton
>
</
Skeleton
>
</
Box
>
</
Box
>
)
}
)
}
...
...
ui/txs/TxsTableItem.tsx
View file @
db52d2cf
...
@@ -120,7 +120,7 @@ const TxsTableItem = ({ tx, showBlockInfo, currentAddress, enableTimeIncrement,
...
@@ -120,7 +120,7 @@ const TxsTableItem = ({ tx, showBlockInfo, currentAddress, enableTimeIncrement,
<
Td
>
<
Td
>
{
tx
.
block
&&
(
{
tx
.
block
&&
(
<
Skeleton
isLoaded=
{
!
isLoading
}
display=
"inline-block"
>
<
Skeleton
isLoaded=
{
!
isLoading
}
display=
"inline-block"
>
<
LinkInternal
href=
{
route
({
pathname
:
'
/block/[height
]
'
,
query
:
{
height
:
tx
.
block
.
toString
()
}
})
}
>
<
LinkInternal
href=
{
route
({
pathname
:
'
/block/[height
_or_hash]
'
,
query
:
{
height_or_hash
:
tx
.
block
.
toString
()
}
})
}
>
{
tx
.
block
}
{
tx
.
block
}
</
LinkInternal
>
</
LinkInternal
>
</
Skeleton
>
</
Skeleton
>
...
...
ui/withdrawals/WithdrawalsListItem.tsx
View file @
db52d2cf
...
@@ -52,7 +52,7 @@ const WithdrawalsListItem = ({ item, isLoading, view }: Props) => {
...
@@ -52,7 +52,7 @@ const WithdrawalsListItem = ({ item, isLoading, view }: Props) => {
</
Flex
>
</
Flex
>
)
:
(
)
:
(
<
LinkInternal
<
LinkInternal
href=
{
route
({
pathname
:
'
/block/[height
]
'
,
query
:
{
height
:
item
.
block_number
.
toString
()
}
})
}
href=
{
route
({
pathname
:
'
/block/[height
_or_hash]
'
,
query
:
{
height_or_hash
:
item
.
block_number
.
toString
()
}
})
}
display=
"flex"
display=
"flex"
width=
"fit-content"
width=
"fit-content"
alignItems=
"center"
alignItems=
"center"
...
...
ui/withdrawals/WithdrawalsTableItem.tsx
View file @
db52d2cf
...
@@ -43,7 +43,7 @@ const WithdrawalsTableItem = ({ item, view, isLoading }: Props) => {
...
@@ -43,7 +43,7 @@ const WithdrawalsTableItem = ({ item, view, isLoading }: Props) => {
</
Flex
>
</
Flex
>
)
:
(
)
:
(
<
LinkInternal
<
LinkInternal
href=
{
route
({
pathname
:
'
/block/[height
]
'
,
query
:
{
height
:
item
.
block_number
.
toString
()
}
})
}
href=
{
route
({
pathname
:
'
/block/[height
_or_hash]
'
,
query
:
{
height_or_hash
:
item
.
block_number
.
toString
()
}
})
}
display=
"flex"
display=
"flex"
width=
"fit-content"
width=
"fit-content"
alignItems=
"center"
alignItems=
"center"
...
...
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