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
8ee9c6bd
Commit
8ee9c6bd
authored
Aug 29, 2023
by
tom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hide total reward in latest blocks and validated blocks views
parent
0ec2e100
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
21 additions
and
15 deletions
+21
-15
.env.rootstock
configs/envs/.env.rootstock
+1
-1
AddressBlocksValidated.tsx
ui/address/AddressBlocksValidated.tsx
+2
-1
AddressBlocksValidatedListItem.tsx
...ddress/blocksValidated/AddressBlocksValidatedListItem.tsx
+6
-4
AddressBlocksValidatedTableItem.tsx
...dress/blocksValidated/AddressBlocksValidatedTableItem.tsx
+8
-5
LatestBlocks.tsx
ui/home/LatestBlocks.tsx
+3
-3
LatestBlocksItem.tsx
ui/home/LatestBlocksItem.tsx
+1
-1
No files found.
configs/envs/.env.rootstock
View file @
8ee9c6bd
...
...
@@ -31,7 +31,7 @@ NEXT_PUBLIC_NETWORK_ICON=https://raw.githubusercontent.com/blockscout/frontend-c
## footer
NEXT_PUBLIC_FOOTER_LINKS=https://raw.githubusercontent.com/blockscout/frontend-configs/main/configs/footer-links/rootstock.json
## views
NEXT_PUBLIC_VIEWS_BLOCK_HIDDEN_FIELDS=['burnt_fees','total_reward']
NEXT_PUBLIC_VIEWS_BLOCK_HIDDEN_FIELDS=['burnt_fees','total_reward'
,'nonce'
]
## misc
# app features
...
...
ui/address/AddressBlocksValidated.tsx
View file @
8ee9c6bd
...
...
@@ -94,7 +94,8 @@ const AddressBlocksValidated = ({ scrollRef }: Props) => {
<
Th
width=
"17%"
>
Age
</
Th
>
<
Th
width=
"16%"
>
Txn
</
Th
>
<
Th
width=
"25%"
>
Gas used
</
Th
>
<
Th
width=
"25%"
isNumeric
>
Reward
{
config
.
chain
.
currency
.
symbol
}
</
Th
>
{
!
config
.
UI
.
views
.
block
.
hiddenFields
?.
total_reward
&&
<
Th
width=
"25%"
isNumeric
>
Reward
{
config
.
chain
.
currency
.
symbol
}
</
Th
>
}
</
Tr
>
</
Thead
>
<
Tbody
>
...
...
ui/address/blocksValidated/AddressBlocksValidatedListItem.tsx
View file @
8ee9c6bd
...
...
@@ -48,10 +48,12 @@ const AddressBlocksValidatedListItem = (props: Props) => {
isLoading=
{
props
.
isLoading
}
/>
</
Flex
>
<
Flex
columnGap=
{
2
}
w=
"100%"
>
<
Skeleton
isLoaded=
{
!
props
.
isLoading
}
fontWeight=
{
500
}
flexShrink=
{
0
}
>
Reward
{
config
.
chain
.
currency
.
symbol
}
</
Skeleton
>
<
Skeleton
isLoaded=
{
!
props
.
isLoading
}
color=
"text_secondary"
>
{
totalReward
.
toFixed
()
}
</
Skeleton
>
</
Flex
>
{
!
config
.
UI
.
views
.
block
.
hiddenFields
?.
total_reward
&&
(
<
Flex
columnGap=
{
2
}
w=
"100%"
>
<
Skeleton
isLoaded=
{
!
props
.
isLoading
}
fontWeight=
{
500
}
flexShrink=
{
0
}
>
Reward
{
config
.
chain
.
currency
.
symbol
}
</
Skeleton
>
<
Skeleton
isLoaded=
{
!
props
.
isLoading
}
color=
"text_secondary"
>
{
totalReward
.
toFixed
()
}
</
Skeleton
>
</
Flex
>
)
}
</
ListItemMobile
>
);
};
...
...
ui/address/blocksValidated/AddressBlocksValidatedTableItem.tsx
View file @
8ee9c6bd
...
...
@@ -6,6 +6,7 @@ import type { Block } from 'types/api/block';
import
{
route
}
from
'
nextjs-routes
'
;
import
config
from
'
configs/app
'
;
import
getBlockTotalReward
from
'
lib/block/getBlockTotalReward
'
;
import
useTimeAgoIncrement
from
'
lib/hooks/useTimeAgoIncrement
'
;
import
LinkInternal
from
'
ui/shared/LinkInternal
'
;
...
...
@@ -50,11 +51,13 @@ const AddressBlocksValidatedTableItem = (props: Props) => {
/>
</
Flex
>
</
Td
>
<
Td
isNumeric
display=
"flex"
justifyContent=
"end"
>
<
Skeleton
isLoaded=
{
!
props
.
isLoading
}
display=
"inline-block"
>
<
span
>
{
totalReward
.
toFixed
()
}
</
span
>
</
Skeleton
>
</
Td
>
{
!
config
.
UI
.
views
.
block
.
hiddenFields
?.
total_reward
&&
(
<
Td
isNumeric
display=
"flex"
justifyContent=
"end"
>
<
Skeleton
isLoaded=
{
!
props
.
isLoading
}
display=
"inline-block"
>
<
span
>
{
totalReward
.
toFixed
()
}
</
span
>
</
Skeleton
>
</
Td
>
)
}
</
Tr
>
);
};
...
...
ui/home/LatestBlocks.tsx
View file @
8ee9c6bd
...
...
@@ -25,18 +25,18 @@ const BLOCK_HEIGHT_L2 = 112;
const
BLOCK_MARGIN
=
12
;
const
LatestBlocks
=
()
=>
{
const
blockHeight
=
config
.
features
.
rollup
.
isEnabled
?
BLOCK_HEIGHT_L2
:
BLOCK_HEIGHT_L1
;
const
blockHeight
=
config
.
features
.
rollup
.
isEnabled
||
config
.
UI
.
views
.
block
.
hiddenFields
?.
total_reward
?
BLOCK_HEIGHT_L2
:
BLOCK_HEIGHT_L1
;
const
isMobile
=
useIsMobile
();
// const blocksMaxCount = isMobile ? 2 : 3;
let
blocksMaxCount
:
number
;
if
(
config
.
features
.
rollup
.
isEnabled
)
{
if
(
config
.
features
.
rollup
.
isEnabled
||
config
.
UI
.
views
.
block
.
hiddenFields
?.
total_reward
)
{
blocksMaxCount
=
isMobile
?
4
:
5
;
}
else
{
blocksMaxCount
=
isMobile
?
2
:
3
;
}
const
{
data
,
isPlaceholderData
,
isError
}
=
useApiQuery
(
'
homepage_blocks
'
,
{
queryOptions
:
{
placeholderData
:
Array
(
4
).
fill
(
BLOCK
),
placeholderData
:
Array
(
blocksMaxCount
).
fill
(
BLOCK
),
},
});
...
...
ui/home/LatestBlocksItem.tsx
View file @
8ee9c6bd
...
...
@@ -65,7 +65,7 @@ const LatestBlocksItem = ({ block, h, isLoading }: Props) => {
<
Grid
gridGap=
{
2
}
templateColumns=
"auto minmax(0, 1fr)"
fontSize=
"sm"
>
<
Skeleton
isLoaded=
{
!
isLoading
}
>
Txn
</
Skeleton
>
<
Skeleton
isLoaded=
{
!
isLoading
}
color=
"text_secondary"
><
span
>
{
block
.
tx_count
}
</
span
></
Skeleton
>
{
!
config
.
features
.
rollup
.
isEnabled
&&
(
{
!
config
.
features
.
rollup
.
isEnabled
&&
!
config
.
UI
.
views
.
block
.
hiddenFields
?.
nonce
&&
(
<>
<
Skeleton
isLoaded=
{
!
isLoading
}
>
Reward
</
Skeleton
>
<
Skeleton
isLoaded=
{
!
isLoading
}
color=
"text_secondary"
><
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