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
391b20fe
Unverified
Commit
391b20fe
authored
Oct 15, 2024
by
Igor Stuev
Committed by
GitHub
Oct 15, 2024
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2291 from blockscout/fe-2281
Blocks validated skeleton displays placeholder values
parents
b6181940
a9ea5812
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
+8
-4
AddressBlocksValidatedListItem.tsx
...ddress/blocksValidated/AddressBlocksValidatedListItem.tsx
+7
-3
AddressBlocksValidatedTableItem.tsx
...dress/blocksValidated/AddressBlocksValidatedTableItem.tsx
+1
-1
No files found.
ui/address/blocksValidated/AddressBlocksValidatedListItem.tsx
View file @
391b20fe
import
{
Flex
,
Skeleton
}
from
'
@chakra-ui/react
'
;
import
{
Text
,
Flex
,
Skeleton
}
from
'
@chakra-ui/react
'
;
import
BigNumber
from
'
bignumber.js
'
;
import
React
from
'
react
'
;
...
...
@@ -45,7 +45,9 @@ const AddressBlocksValidatedListItem = (props: Props) => {
</
Flex
>
<
Flex
columnGap=
{
2
}
w=
"100%"
>
<
Skeleton
isLoaded=
{
!
props
.
isLoading
}
fontWeight=
{
500
}
flexShrink=
{
0
}
>
Gas used
</
Skeleton
>
<
Skeleton
isLoaded=
{
!
props
.
isLoading
}
color=
"text_secondary"
>
{
BigNumber
(
props
.
gas_used
||
0
).
toFormat
()
}
</
Skeleton
>
<
Skeleton
isLoaded=
{
!
props
.
isLoading
}
>
<
Text
color=
"text_secondary"
>
{
BigNumber
(
props
.
gas_used
||
0
).
toFormat
()
}
</
Text
>
</
Skeleton
>
<
BlockGasUsed
gasUsed=
{
props
.
gas_used
}
gasLimit=
{
props
.
gas_limit
}
...
...
@@ -55,7 +57,9 @@ const AddressBlocksValidatedListItem = (props: Props) => {
{
!
config
.
UI
.
views
.
block
.
hiddenFields
?.
total_reward
&&
!
config
.
features
.
rollup
.
isEnabled
&&
(
<
Flex
columnGap=
{
2
}
w=
"100%"
>
<
Skeleton
isLoaded=
{
!
props
.
isLoading
}
fontWeight=
{
500
}
flexShrink=
{
0
}
>
Reward
{
currencyUnits
.
ether
}
</
Skeleton
>
<
Skeleton
isLoaded=
{
!
props
.
isLoading
}
color=
"text_secondary"
>
{
totalReward
.
toFixed
()
}
</
Skeleton
>
<
Skeleton
isLoaded=
{
!
props
.
isLoading
}
>
<
Text
color=
"text_secondary"
>
{
totalReward
.
toFixed
()
}
</
Text
>
</
Skeleton
>
</
Flex
>
)
}
</
ListItemMobile
>
...
...
ui/address/blocksValidated/AddressBlocksValidatedTableItem.tsx
View file @
391b20fe
...
...
@@ -57,7 +57,7 @@ const AddressBlocksValidatedTableItem = (props: Props) => {
</
Flex
>
</
Td
>
{
!
config
.
UI
.
views
.
block
.
hiddenFields
?.
total_reward
&&
!
config
.
features
.
rollup
.
isEnabled
&&
(
<
Td
isNumeric
display=
"flex"
justifyContent=
"end"
>
<
Td
isNumeric
>
<
Skeleton
isLoaded=
{
!
props
.
isLoading
}
display=
"inline-block"
>
<
span
>
{
totalReward
.
toFixed
()
}
</
span
>
</
Skeleton
>
...
...
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