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
a19110b6
Commit
a19110b6
authored
Feb 04, 2025
by
tom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
block withdrawals, blob txs and epoch rewards tabs
parent
31a8d6be
Changes
18
Show whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
189 additions
and
158 deletions
+189
-158
alert.tsx
toolkit/chakra/alert.tsx
+15
-1
skeleton.tsx
toolkit/chakra/skeleton.tsx
+1
-1
alert.recipe.ts
toolkit/theme/recipes/alert.recipe.ts
+9
-0
table.recipe.ts
toolkit/theme/recipes/table.recipe.ts
+2
-1
BlockWithdrawals.tsx
ui/block/BlockWithdrawals.tsx
+9
-8
BlockEpochElectionRewardDetailsDesktop.tsx
...k/epochRewards/BlockEpochElectionRewardDetailsDesktop.tsx
+2
-4
BlockEpochElectionRewardDetailsMobile.tsx
...ck/epochRewards/BlockEpochElectionRewardDetailsMobile.tsx
+10
-4
BlockEpochElectionRewards.tsx
ui/block/epochRewards/BlockEpochElectionRewards.tsx
+21
-18
BlockEpochElectionRewardsListItem.tsx
ui/block/epochRewards/BlockEpochElectionRewardsListItem.tsx
+17
-16
BlockEpochElectionRewardsTableItem.tsx
ui/block/epochRewards/BlockEpochElectionRewardsTableItem.tsx
+34
-34
Block.tsx
ui/pages/Block.tsx
+24
-24
EpochRewardTypeTag.tsx
ui/shared/EpochRewardTypeTag.tsx
+5
-5
SocketNewItemsNotice.tsx
ui/shared/SocketNewItemsNotice.tsx
+0
-1
TokenTransferSnippet.tsx
ui/shared/TokenTransferSnippet/TokenTransferSnippet.tsx
+2
-2
MaintenanceAlert.tsx
ui/snippets/header/alerts/MaintenanceAlert.tsx
+1
-1
BeaconChainWithdrawalsListItem.tsx
...ithdrawals/beaconChain/BeaconChainWithdrawalsListItem.tsx
+3
-3
BeaconChainWithdrawalsTable.tsx
ui/withdrawals/beaconChain/BeaconChainWithdrawalsTable.tsx
+16
-17
BeaconChainWithdrawalsTableItem.tsx
...thdrawals/beaconChain/BeaconChainWithdrawalsTableItem.tsx
+18
-18
No files found.
toolkit/chakra/alert.tsx
View file @
a19110b6
...
@@ -14,6 +14,7 @@ export interface AlertProps extends Omit<ChakraAlert.RootProps, 'title'> {
...
@@ -14,6 +14,7 @@ export interface AlertProps extends Omit<ChakraAlert.RootProps, 'title'> {
closable
?:
boolean
;
closable
?:
boolean
;
onClose
?:
()
=>
void
;
onClose
?:
()
=>
void
;
loading
?:
boolean
;
loading
?:
boolean
;
showIcon
?:
boolean
;
}
}
export
const
Alert
=
React
.
forwardRef
<
HTMLDivElement
,
AlertProps
>
(
export
const
Alert
=
React
.
forwardRef
<
HTMLDivElement
,
AlertProps
>
(
...
@@ -27,15 +28,28 @@ export const Alert = React.forwardRef<HTMLDivElement, AlertProps>(
...
@@ -27,15 +28,28 @@ export const Alert = React.forwardRef<HTMLDivElement, AlertProps>(
startElement
,
startElement
,
endElement
,
endElement
,
loading
,
loading
,
showIcon
=
false
,
...
rest
...
rest
}
=
props
;
}
=
props
;
const
defaultIcon
=
<
IconSvg
name=
"info_filled"
w=
"100%"
h=
"100%"
/>;
const
defaultIcon
=
<
IconSvg
name=
"info_filled"
w=
"100%"
h=
"100%"
/>;
const
iconElement
=
(()
=>
{
if
(
startElement
!==
undefined
)
{
return
startElement
;
}
if
(
!
showIcon
&&
icon
===
undefined
)
{
return
null
;
}
return
<
ChakraAlert
.
Indicator
>
{
icon
||
defaultIcon
}
</
ChakraAlert
.
Indicator
>;
})();
return
(
return
(
<
Skeleton
loading=
{
loading
}
asChild
>
<
Skeleton
loading=
{
loading
}
asChild
>
<
ChakraAlert
.
Root
ref=
{
ref
}
{
...
rest
}
>
<
ChakraAlert
.
Root
ref=
{
ref
}
{
...
rest
}
>
{
startElement
!==
undefined
||
icon
!==
undefined
?
startElement
:
<
ChakraAlert
.
Indicator
>
{
icon
||
defaultIcon
}
</
ChakraAlert
.
Indicator
>
}
{
iconElement
}
{
children
?
(
{
children
?
(
<
ChakraAlert
.
Content
>
<
ChakraAlert
.
Content
>
{
title
&&
<
ChakraAlert
.
Title
>
{
title
}
</
ChakraAlert
.
Title
>
}
{
title
&&
<
ChakraAlert
.
Title
>
{
title
}
</
ChakraAlert
.
Title
>
}
...
...
toolkit/chakra/skeleton.tsx
View file @
a19110b6
...
@@ -46,7 +46,7 @@ export const SkeletonText = React.forwardRef<HTMLDivElement, SkeletonTextProps>(
...
@@ -46,7 +46,7 @@ export const SkeletonText = React.forwardRef<HTMLDivElement, SkeletonTextProps>(
export
const
Skeleton
=
React
.
forwardRef
<
HTMLDivElement
,
ChakraSkeletonProps
>
(
export
const
Skeleton
=
React
.
forwardRef
<
HTMLDivElement
,
ChakraSkeletonProps
>
(
function
Skeleton
(
props
,
ref
)
{
function
Skeleton
(
props
,
ref
)
{
const
{
loading
=
fals
e
,
...
rest
}
=
props
;
const
{
loading
=
tru
e
,
...
rest
}
=
props
;
return
<
ChakraSkeleton
loading=
{
loading
}
{
...
(
loading
?
{
'
data
-
loading
':
true
}
:
{})
}
{
...
rest
}
ref=
{
ref
}
/>;
return
<
ChakraSkeleton
loading=
{
loading
}
{
...
(
loading
?
{
'
data
-
loading
':
true
}
:
{})
}
{
...
rest
}
ref=
{
ref
}
/>;
},
},
);
);
toolkit/theme/recipes/alert.recipe.ts
View file @
a19110b6
...
@@ -95,6 +95,14 @@ export const recipe = defineSlotRecipe({
...
@@ -95,6 +95,14 @@ export const recipe = defineSlotRecipe({
},
},
},
},
variant
:
{
subtle
:
{
root
:
{
color
:
'
alert.fg
'
,
},
},
},
inline
:
{
inline
:
{
'
true
'
:
{
'
true
'
:
{
root
:
{
root
:
{
...
@@ -134,5 +142,6 @@ export const recipe = defineSlotRecipe({
...
@@ -134,5 +142,6 @@ export const recipe = defineSlotRecipe({
status
:
'
neutral
'
,
status
:
'
neutral
'
,
size
:
'
md
'
,
size
:
'
md
'
,
inline
:
true
,
inline
:
true
,
variant
:
'
subtle
'
,
},
},
});
});
toolkit/theme/recipes/table.recipe.ts
View file @
a19110b6
...
@@ -17,9 +17,10 @@ export const recipe = defineSlotRecipe({
...
@@ -17,9 +17,10 @@ export const recipe = defineSlotRecipe({
textAlign
:
'
start
'
,
textAlign
:
'
start
'
,
alignItems
:
'
center
'
,
alignItems
:
'
center
'
,
verticalAlign
:
'
top
'
,
verticalAlign
:
'
top
'
,
fontWeight
:
'
medium
'
,
},
},
columnHeader
:
{
columnHeader
:
{
fontWeight
:
'
500
'
,
fontWeight
:
'
medium
'
,
textAlign
:
'
start
'
,
textAlign
:
'
start
'
,
},
},
},
},
...
...
ui/block/BlockWithdrawals.tsx
View file @
a19110b6
import
{
Show
,
Hide
}
from
'
@chakra-ui/react
'
;
import
{
Box
}
from
'
@chakra-ui/react
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
import
DataListDisplay
from
'
ui/shared/DataListDisplay
'
;
import
DataListDisplay
from
'
ui/shared/DataListDisplay
'
;
...
@@ -14,31 +14,32 @@ const TABS_HEIGHT = 88;
...
@@ -14,31 +14,32 @@ const TABS_HEIGHT = 88;
const
BlockWithdrawals
=
({
blockWithdrawalsQuery
}:
Props
)
=>
{
const
BlockWithdrawals
=
({
blockWithdrawalsQuery
}:
Props
)
=>
{
const
content
=
blockWithdrawalsQuery
.
data
?.
items
?
(
const
content
=
blockWithdrawalsQuery
.
data
?.
items
?
(
<>
<>
<
Show
below=
"lg"
ssr=
{
false
}
>
<
Box
hideFrom=
"lg"
>
<
BeaconChainWithdrawalsList
<
BeaconChainWithdrawalsList
items=
{
blockWithdrawalsQuery
.
data
.
items
}
items=
{
blockWithdrawalsQuery
.
data
.
items
}
isLoading=
{
blockWithdrawalsQuery
.
isPlaceholderData
}
isLoading=
{
blockWithdrawalsQuery
.
isPlaceholderData
}
view=
"block"
view=
"block"
/>
/>
</
Show
>
</
Box
>
<
Hide
below=
"lg"
ssr=
{
false
}
>
<
Box
hideBelow=
"lg"
>
<
BeaconChainWithdrawalsTable
<
BeaconChainWithdrawalsTable
items=
{
blockWithdrawalsQuery
.
data
.
items
}
items=
{
blockWithdrawalsQuery
.
data
.
items
}
isLoading=
{
blockWithdrawalsQuery
.
isPlaceholderData
}
isLoading=
{
blockWithdrawalsQuery
.
isPlaceholderData
}
top=
{
blockWithdrawalsQuery
.
pagination
.
isVisible
?
TABS_HEIGHT
:
0
}
top=
{
blockWithdrawalsQuery
.
pagination
.
isVisible
?
TABS_HEIGHT
:
0
}
view=
"block"
view=
"block"
/>
/>
</
Hide
>
</
Box
>
</>
</>
)
:
null
;
)
:
null
;
return
(
return
(
<
DataListDisplay
<
DataListDisplay
isError=
{
blockWithdrawalsQuery
.
isError
}
isError=
{
blockWithdrawalsQuery
.
isError
}
items
=
{
blockWithdrawalsQuery
.
data
?.
items
}
items
Num=
{
blockWithdrawalsQuery
.
data
?.
items
?.
length
}
emptyText=
"There are no withdrawals for this block."
emptyText=
"There are no withdrawals for this block."
content=
{
content
}
>
/>
{
content
}
</
DataListDisplay
>
);
);
};
};
...
...
ui/block/epochRewards/BlockEpochElectionRewardDetailsDesktop.tsx
View file @
a19110b6
import
{
Box
,
Grid
,
GridItem
,
Text
,
useColorModeValue
}
from
'
@chakra-ui/react
'
;
import
{
Box
,
Grid
,
GridItem
,
Text
}
from
'
@chakra-ui/react
'
;
import
{
useRouter
}
from
'
next/router
'
;
import
{
useRouter
}
from
'
next/router
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
...
@@ -24,8 +24,6 @@ const BlockEpochElectionRewardDetailsDesktop = ({ type, token }: Props) => {
...
@@ -24,8 +24,6 @@ const BlockEpochElectionRewardDetailsDesktop = ({ type, token }: Props) => {
const
router
=
useRouter
();
const
router
=
useRouter
();
const
heightOrHash
=
getQueryParamString
(
router
.
query
.
height_or_hash
);
const
heightOrHash
=
getQueryParamString
(
router
.
query
.
height_or_hash
);
const
bgColor
=
useColorModeValue
(
'
blackAlpha.50
'
,
'
whiteAlpha.50
'
);
const
{
cutRef
,
query
}
=
useLazyLoadedList
({
const
{
cutRef
,
query
}
=
useLazyLoadedList
({
rootRef
,
rootRef
,
resourceName
:
'
block_election_rewards
'
,
resourceName
:
'
block_election_rewards
'
,
...
@@ -40,7 +38,7 @@ const BlockEpochElectionRewardDetailsDesktop = ({ type, token }: Props) => {
...
@@ -40,7 +38,7 @@ const BlockEpochElectionRewardDetailsDesktop = ({ type, token }: Props) => {
return
(
return
(
<
Box
<
Box
p=
{
4
}
p=
{
4
}
bgColor=
{
bgColor
}
bgColor=
{
{
_light
:
'
blackAlpha.50
'
,
_dark
:
'
whiteAlpha.50
'
}
}
borderRadius=
"base"
borderRadius=
"base"
maxH=
"360px"
maxH=
"360px"
overflowY=
"scroll"
overflowY=
"scroll"
...
...
ui/block/epochRewards/BlockEpochElectionRewardDetailsMobile.tsx
View file @
a19110b6
import
{
Box
,
Flex
,
Text
,
useColorModeValue
}
from
'
@chakra-ui/react
'
;
import
{
Box
,
Flex
,
Text
}
from
'
@chakra-ui/react
'
;
import
{
useRouter
}
from
'
next/router
'
;
import
{
useRouter
}
from
'
next/router
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
...
@@ -25,8 +25,6 @@ const BlockEpochElectionRewardDetailsMobile = ({ type, token }: Props) => {
...
@@ -25,8 +25,6 @@ const BlockEpochElectionRewardDetailsMobile = ({ type, token }: Props) => {
const
router
=
useRouter
();
const
router
=
useRouter
();
const
heightOrHash
=
getQueryParamString
(
router
.
query
.
height_or_hash
);
const
heightOrHash
=
getQueryParamString
(
router
.
query
.
height_or_hash
);
const
bgColor
=
useColorModeValue
(
'
blackAlpha.50
'
,
'
whiteAlpha.50
'
);
const
{
cutRef
,
query
}
=
useLazyLoadedList
({
const
{
cutRef
,
query
}
=
useLazyLoadedList
({
rootRef
,
rootRef
,
resourceName
:
'
block_election_rewards
'
,
resourceName
:
'
block_election_rewards
'
,
...
@@ -37,7 +35,15 @@ const BlockEpochElectionRewardDetailsMobile = ({ type, token }: Props) => {
...
@@ -37,7 +35,15 @@ const BlockEpochElectionRewardDetailsMobile = ({ type, token }: Props) => {
});
});
return
(
return
(
<
Flex
flexDir=
"column"
rowGap=
{
3
}
p=
{
4
}
bgColor=
{
bgColor
}
borderRadius=
"base"
maxH=
"360px"
overflowY=
"scroll"
>
<
Flex
flexDir=
"column"
rowGap=
{
3
}
p=
{
4
}
bgColor=
{
{
_light
:
'
blackAlpha.50
'
,
_dark
:
'
whiteAlpha.50
'
}
}
borderRadius=
"base"
maxH=
"360px"
overflowY=
"scroll"
>
{
query
.
data
?.
pages
{
query
.
data
?.
pages
.
map
((
page
)
=>
page
.
items
)
.
map
((
page
)
=>
page
.
items
)
...
...
ui/block/epochRewards/BlockEpochElectionRewards.tsx
View file @
a19110b6
import
{
Box
,
Heading
,
Hide
,
Show
,
Table
,
Tbody
,
Th
,
Thead
,
Tr
}
from
'
@chakra-ui/react
'
;
import
{
Box
}
from
'
@chakra-ui/react
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
import
type
{
BlockEpoch
}
from
'
types/api/block
'
;
import
type
{
BlockEpoch
}
from
'
types/api/block
'
;
import
{
Heading
}
from
'
toolkit/chakra/heading
'
;
import
{
TableBody
,
TableColumnHeader
,
TableHeaderSticky
,
TableRoot
,
TableRow
}
from
'
toolkit/chakra/table
'
;
import
BlockEpochElectionRewardsListItem
from
'
./BlockEpochElectionRewardsListItem
'
;
import
BlockEpochElectionRewardsListItem
from
'
./BlockEpochElectionRewardsListItem
'
;
import
BlockEpochElectionRewardsTableItem
from
'
./BlockEpochElectionRewardsTableItem
'
;
import
BlockEpochElectionRewardsTableItem
from
'
./BlockEpochElectionRewardsTableItem
'
;
...
@@ -14,18 +17,18 @@ interface Props {
...
@@ -14,18 +17,18 @@ interface Props {
const
BlockEpochElectionRewards
=
({
data
,
isLoading
}:
Props
)
=>
{
const
BlockEpochElectionRewards
=
({
data
,
isLoading
}:
Props
)
=>
{
return
(
return
(
<
Box
mt=
{
8
}
>
<
Box
mt=
{
8
}
>
<
Heading
as=
"h4"
size=
"sm
"
mb=
{
3
}
>
Election rewards
</
Heading
>
<
Heading
level=
"3
"
mb=
{
3
}
>
Election rewards
</
Heading
>
<
Hide
below=
"lg"
ssr=
{
false
}
>
<
Box
hideBelow=
"lg"
>
<
Table
style=
{
{
tableLayout
:
'
auto
'
}
}
>
<
Table
Root
style=
{
{
tableLayout
:
'
auto
'
}
}
>
<
T
head
>
<
T
ableHeaderSticky
>
<
T
r
>
<
T
ableRow
>
<
T
h
width=
"24px"
/>
<
T
ableColumnHeader
width=
"24px"
/>
<
T
h
width=
"180px"
>
Reward type
</
Th
>
<
T
ableColumnHeader
width=
"180px"
>
Reward type
</
TableColumnHeader
>
<
T
h
/>
<
T
ableColumnHeader
/>
<
T
h
isNumeric
>
Value
</
Th
>
<
T
ableColumnHeader
isNumeric
>
Value
</
TableColumnHeader
>
</
T
r
>
</
T
ableRow
>
</
T
head
>
</
T
ableHeaderSticky
>
<
T
b
ody
>
<
T
ableB
ody
>
{
Object
.
entries
(
data
.
aggregated_election_rewards
).
map
((
entry
)
=>
{
{
Object
.
entries
(
data
.
aggregated_election_rewards
).
map
((
entry
)
=>
{
const
key
=
entry
[
0
]
as
keyof
BlockEpoch
[
'
aggregated_election_rewards
'
];
const
key
=
entry
[
0
]
as
keyof
BlockEpoch
[
'
aggregated_election_rewards
'
];
const
value
=
entry
[
1
];
const
value
=
entry
[
1
];
...
@@ -43,10 +46,10 @@ const BlockEpochElectionRewards = ({ data, isLoading }: Props) => {
...
@@ -43,10 +46,10 @@ const BlockEpochElectionRewards = ({ data, isLoading }: Props) => {
/>
/>
);
);
})
}
})
}
</
T
b
ody
>
</
T
ableB
ody
>
</
Table
>
</
Table
Root
>
</
Hide
>
</
Box
>
<
Show
below=
"lg"
ssr=
{
false
}
>
<
Box
hideFrom=
"lg"
>
{
Object
.
entries
(
data
.
aggregated_election_rewards
).
map
((
entry
)
=>
{
{
Object
.
entries
(
data
.
aggregated_election_rewards
).
map
((
entry
)
=>
{
const
key
=
entry
[
0
]
as
keyof
BlockEpoch
[
'
aggregated_election_rewards
'
];
const
key
=
entry
[
0
]
as
keyof
BlockEpoch
[
'
aggregated_election_rewards
'
];
const
value
=
entry
[
1
];
const
value
=
entry
[
1
];
...
@@ -64,7 +67,7 @@ const BlockEpochElectionRewards = ({ data, isLoading }: Props) => {
...
@@ -64,7 +67,7 @@ const BlockEpochElectionRewards = ({ data, isLoading }: Props) => {
/>
/>
);
);
})
}
})
}
</
Show
>
</
Box
>
</
Box
>
</
Box
>
);
);
};
};
...
...
ui/block/epochRewards/BlockEpochElectionRewardsListItem.tsx
View file @
a19110b6
import
{
Box
,
Flex
,
IconButton
,
useDisclosure
}
from
'
@chakra-ui/react
'
;
import
{
Box
,
Flex
}
from
'
@chakra-ui/react
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
import
type
{
BlockEpoch
,
BlockEpochElectionReward
}
from
'
types/api/block
'
;
import
type
{
BlockEpoch
,
BlockEpochElectionReward
}
from
'
types/api/block
'
;
import
getCurrencyValue
from
'
lib/getCurrencyValue
'
;
import
getCurrencyValue
from
'
lib/getCurrencyValue
'
;
import
Skeleton
from
'
ui/shared/chakra/Skeleton
'
;
import
{
IconButton
}
from
'
toolkit/chakra/icon-button
'
;
import
{
Skeleton
}
from
'
toolkit/chakra/skeleton
'
;
import
{
useDisclosure
}
from
'
toolkit/hooks/useDisclosure
'
;
import
TokenEntity
from
'
ui/shared/entities/token/TokenEntity
'
;
import
TokenEntity
from
'
ui/shared/entities/token/TokenEntity
'
;
import
EpochRewardTypeTag
from
'
ui/shared/EpochRewardTypeTag
'
;
import
EpochRewardTypeTag
from
'
ui/shared/EpochRewardTypeTag
'
;
import
IconSvg
from
'
ui/shared/IconSvg
'
;
import
IconSvg
from
'
ui/shared/IconSvg
'
;
...
@@ -37,27 +39,26 @@ const BlockEpochElectionRewardsListItem = ({ data, isLoading, type }: Props) =>
...
@@ -37,27 +39,26 @@ const BlockEpochElectionRewardsListItem = ({ data, isLoading, type }: Props) =>
>
>
<
Flex
my=
"3px"
columnGap=
{
3
}
alignItems=
"center"
flexWrap=
"wrap"
rowGap=
{
2
}
>
<
Flex
my=
"3px"
columnGap=
{
3
}
alignItems=
"center"
flexWrap=
"wrap"
rowGap=
{
2
}
>
{
data
.
count
?
(
{
data
.
count
?
(
<
Skeleton
isLoaded=
{
!
isLoading
}
display=
"flex"
borderRadius=
"sm"
>
<
Skeleton
loading=
{
isLoading
}
display=
"flex"
borderRadius=
"sm"
>
<
IconButton
<
IconButton
aria
-
label=
{
section
.
isO
pen
?
'
Collapse section
'
:
'
Expand section
'
}
aria
-
label=
{
section
.
o
pen
?
'
Collapse section
'
:
'
Expand section
'
}
variant=
"link"
variant=
"link"
boxSize=
{
6
}
boxSize=
{
6
}
flexShrink=
{
0
}
flexShrink=
{
0
}
icon=
{
(
>
<
IconSvg
<
IconSvg
name=
"arrows/east-mini"
name=
"arrows/east-mini"
boxSize=
{
6
}
boxSize=
{
6
}
transform=
{
section
.
isO
pen
?
'
rotate(270deg)
'
:
'
rotate(180deg)
'
}
transform=
{
section
.
o
pen
?
'
rotate(270deg)
'
:
'
rotate(180deg)
'
}
transitionDuration=
"faster"
transitionDuration=
"faster"
/>
/>
)
}
</
IconButton
>
/>
</
Skeleton
>
</
Skeleton
>
)
:
<
Box
boxSize=
{
6
}
/>
}
)
:
<
Box
boxSize=
{
6
}
/>
}
<
EpochRewardTypeTag
type=
{
type
}
isLoading=
{
isLoading
}
/>
<
EpochRewardTypeTag
type=
{
type
}
isLoading=
{
isLoading
}
/>
<
Skeleton
isLoaded=
{
!
isLoading
}
>
{
data
.
count
}
</
Skeleton
>
<
Skeleton
loading=
{
isLoading
}
>
{
data
.
count
}
</
Skeleton
>
<
Flex
columnGap=
{
2
}
alignItems=
"center"
ml=
{
{
base
:
9
,
lg
:
'
auto
'
}
}
w=
{
{
base
:
'
100%
'
,
lg
:
'
fit-content
'
}
}
fontWeight=
{
500
}
>
<
Flex
columnGap=
{
2
}
alignItems=
"center"
ml=
{
{
base
:
9
,
lg
:
'
auto
'
}
}
w=
{
{
base
:
'
100%
'
,
lg
:
'
fit-content
'
}
}
fontWeight=
{
500
}
>
<
Skeleton
isLoaded=
{
!
isLoading
}
>
{
valueStr
}
</
Skeleton
>
<
Skeleton
loading=
{
isLoading
}
>
{
valueStr
}
</
Skeleton
>
<
TokenEntity
<
TokenEntity
token=
{
data
.
token
}
token=
{
data
.
token
}
noCopy
noCopy
...
@@ -67,7 +68,7 @@ const BlockEpochElectionRewardsListItem = ({ data, isLoading, type }: Props) =>
...
@@ -67,7 +68,7 @@ const BlockEpochElectionRewardsListItem = ({ data, isLoading, type }: Props) =>
/>
/>
</
Flex
>
</
Flex
>
</
Flex
>
</
Flex
>
{
section
.
isO
pen
&&
(
{
section
.
o
pen
&&
(
<
Box
mt=
{
2
}
>
<
Box
mt=
{
2
}
>
<
BlockEpochElectionRewardDetailsMobile
type=
{
type
}
token=
{
data
.
token
}
/>
<
BlockEpochElectionRewardDetailsMobile
type=
{
type
}
token=
{
data
.
token
}
/>
</
Box
>
</
Box
>
...
...
ui/block/epochRewards/BlockEpochElectionRewardsTableItem.tsx
View file @
a19110b6
import
{
Flex
,
IconButton
,
Td
,
Tr
,
useDisclosure
}
from
'
@chakra-ui/react
'
;
import
{
Flex
}
from
'
@chakra-ui/react
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
import
type
{
BlockEpoch
,
BlockEpochElectionReward
}
from
'
types/api/block
'
;
import
type
{
BlockEpoch
,
BlockEpochElectionReward
}
from
'
types/api/block
'
;
import
getCurrencyValue
from
'
lib/getCurrencyValue
'
;
import
getCurrencyValue
from
'
lib/getCurrencyValue
'
;
import
Skeleton
from
'
ui/shared/chakra/Skeleton
'
;
import
{
IconButton
}
from
'
toolkit/chakra/icon-button
'
;
import
{
Skeleton
}
from
'
toolkit/chakra/skeleton
'
;
import
{
TableCell
,
TableRow
}
from
'
toolkit/chakra/table
'
;
import
{
useDisclosure
}
from
'
toolkit/hooks/useDisclosure
'
;
import
TokenEntity
from
'
ui/shared/entities/token/TokenEntity
'
;
import
TokenEntity
from
'
ui/shared/entities/token/TokenEntity
'
;
import
EpochRewardTypeTag
from
'
ui/shared/EpochRewardTypeTag
'
;
import
EpochRewardTypeTag
from
'
ui/shared/EpochRewardTypeTag
'
;
import
IconSvg
from
'
ui/shared/IconSvg
'
;
import
IconSvg
from
'
ui/shared/IconSvg
'
;
...
@@ -26,45 +29,42 @@ const BlockEpochElectionRewardsTableItem = ({ isLoading, data, type }: Props) =>
...
@@ -26,45 +29,42 @@ const BlockEpochElectionRewardsTableItem = ({ isLoading, data, type }: Props) =>
decimals
:
data
.
token
.
decimals
,
decimals
:
data
.
token
.
decimals
,
});
});
const
mainRowBorderColor
=
section
.
isO
pen
?
'
transparent
'
:
'
border.divider
'
;
const
mainRowBorderColor
=
section
.
o
pen
?
'
transparent
'
:
'
border.divider
'
;
return
(
return
(
<>
<>
<
T
r
<
T
ableRow
onClick=
{
isLoading
||
!
data
.
count
?
undefined
:
section
.
onToggle
}
onClick=
{
isLoading
||
!
data
.
count
?
undefined
:
section
.
onToggle
}
cursor=
{
isLoading
||
!
data
.
count
?
undefined
:
'
pointer
'
}
cursor=
{
isLoading
||
!
data
.
count
?
undefined
:
'
pointer
'
}
>
>
<
T
d
borderColor=
{
mainRowBorderColor
}
>
<
T
ableCell
borderColor=
{
mainRowBorderColor
}
>
{
Boolean
(
data
.
count
)
&&
(
{
Boolean
(
data
.
count
)
&&
(
<
Skeleton
isLoaded=
{
!
isLoading
}
display=
"flex"
borderRadius=
"sm"
>
<
Skeleton
loading=
{
isLoading
}
display=
"flex"
borderRadius=
"sm"
>
<
IconButton
<
IconButton
aria
-
label=
{
section
.
isO
pen
?
'
Collapse section
'
:
'
Expand section
'
}
aria
-
label=
{
section
.
o
pen
?
'
Collapse section
'
:
'
Expand section
'
}
variant=
"link"
variant=
"link"
boxSize=
{
6
}
>
flexShrink=
{
0
}
icon=
{
(
<
IconSvg
<
IconSvg
name=
"arrows/east-mini"
name=
"arrows/east-mini"
boxSize=
{
6
}
boxSize=
{
6
}
transform=
{
section
.
isO
pen
?
'
rotate(270deg)
'
:
'
rotate(180deg)
'
}
transform=
{
section
.
o
pen
?
'
rotate(270deg)
'
:
'
rotate(180deg)
'
}
transitionDuration=
"faster"
transitionDuration=
"faster"
/>
/>
)
}
</
IconButton
>
/>
</
Skeleton
>
</
Skeleton
>
)
}
)
}
</
T
d
>
</
T
ableCell
>
<
T
d
borderColor=
{
mainRowBorderColor
}
>
<
T
ableCell
borderColor=
{
mainRowBorderColor
}
>
<
EpochRewardTypeTag
type=
{
type
}
isLoading=
{
isLoading
}
/>
<
EpochRewardTypeTag
type=
{
type
}
isLoading=
{
isLoading
}
/>
</
T
d
>
</
T
ableCell
>
<
T
d
borderColor=
{
mainRowBorderColor
}
>
<
T
ableCell
borderColor=
{
mainRowBorderColor
}
>
<
Skeleton
isLoaded=
{
!
isLoading
}
fontWeight=
{
400
}
my=
{
1
}
>
<
Skeleton
loading=
{
isLoading
}
fontWeight=
{
400
}
my=
{
1
}
>
{
getRewardNumText
(
type
,
data
.
count
)
}
{
getRewardNumText
(
type
,
data
.
count
)
}
</
Skeleton
>
</
Skeleton
>
</
T
d
>
</
T
ableCell
>
<
T
d
borderColor=
{
mainRowBorderColor
}
>
<
T
ableCell
borderColor=
{
mainRowBorderColor
}
>
<
Flex
columnGap=
{
2
}
alignItems=
"center"
justifyContent=
"flex-end"
my=
"2px"
>
<
Flex
columnGap=
{
2
}
alignItems=
"center"
justifyContent=
"flex-end"
my=
"2px"
>
<
Skeleton
isLoaded=
{
!
isLoading
}
>
{
valueStr
}
</
Skeleton
>
<
Skeleton
loading=
{
isLoading
}
>
{
valueStr
}
</
Skeleton
>
<
TokenEntity
<
TokenEntity
token=
{
data
.
token
}
token=
{
data
.
token
}
noCopy
noCopy
...
@@ -73,15 +73,15 @@ const BlockEpochElectionRewardsTableItem = ({ isLoading, data, type }: Props) =>
...
@@ -73,15 +73,15 @@ const BlockEpochElectionRewardsTableItem = ({ isLoading, data, type }: Props) =>
isLoading=
{
isLoading
}
isLoading=
{
isLoading
}
/>
/>
</
Flex
>
</
Flex
>
</
T
d
>
</
T
ableCell
>
</
T
r
>
</
T
ableRow
>
{
section
.
isO
pen
&&
(
{
section
.
o
pen
&&
(
<
T
r
>
<
T
ableRow
>
<
T
d
/>
<
T
ableCell
/>
<
T
d
colSpan=
{
3
}
pr=
{
0
}
pt=
{
0
}
>
<
T
ableCell
colSpan=
{
3
}
pr=
{
0
}
pt=
{
0
}
>
<
BlockEpochElectionRewardDetailsDesktop
type=
{
type
}
token=
{
data
.
token
}
/>
<
BlockEpochElectionRewardDetailsDesktop
type=
{
type
}
token=
{
data
.
token
}
/>
</
T
d
>
</
T
ableCell
>
</
T
r
>
</
T
ableRow
>
)
}
)
}
</>
</>
);
);
...
...
ui/pages/Block.tsx
View file @
a19110b6
...
@@ -78,30 +78,30 @@ const BlockPageContent = () => {
...
@@ -78,30 +78,30 @@ const BlockPageContent = () => {
</>
</>
),
),
},
},
//
config.features.dataAvailability.isEnabled && blockQuery.data?.blob_transaction_count ?
config
.
features
.
dataAvailability
.
isEnabled
&&
blockQuery
.
data
?.
blob_transaction_count
?
//
{
{
//
id: 'blob_txs',
id
:
'
blob_txs
'
,
//
title: 'Blob txns',
title
:
'
Blob txns
'
,
//
component: (
component
:
(
//
<TxsWithFrontendSorting query={ blockBlobTxsQuery } showBlockInfo={ false } showSocketInfo={ false }/>
<
TxsWithFrontendSorting
query=
{
blockBlobTxsQuery
}
showBlockInfo=
{
false
}
showSocketInfo=
{
false
}
/>
//
),
),
//
} : null,
}
:
null
,
//
config.features.beaconChain.isEnabled && Boolean(blockQuery.data?.withdrawals_count) ?
config
.
features
.
beaconChain
.
isEnabled
&&
Boolean
(
blockQuery
.
data
?.
withdrawals_count
)
?
//
{
{
//
id: 'withdrawals',
id
:
'
withdrawals
'
,
//
title: 'Withdrawals',
title
:
'
Withdrawals
'
,
//
component: (
component
:
(
//
<>
<>
//
{ blockWithdrawalsQuery.isDegradedData && <ServiceDegradationWarning isLoading={ blockWithdrawalsQuery.isPlaceholderData } mb={ 6 }/> }
{
blockWithdrawalsQuery
.
isDegradedData
&&
<
ServiceDegradationWarning
isLoading=
{
blockWithdrawalsQuery
.
isPlaceholderData
}
mb=
{
6
}
/>
}
//
<BlockWithdrawals blockWithdrawalsQuery={ blockWithdrawalsQuery }/>
<
BlockWithdrawals
blockWithdrawalsQuery=
{
blockWithdrawalsQuery
}
/>
//
</>
</>
//
),
),
//
} : null,
}
:
null
,
//
blockQuery.data?.celo?.is_epoch_block ? {
blockQuery
.
data
?.
celo
?.
is_epoch_block
?
{
//
id: 'epoch_rewards',
id
:
'
epoch_rewards
'
,
//
title: 'Epoch rewards',
title
:
'
Epoch rewards
'
,
//
component: <BlockEpochRewards heightOrHash={ heightOrHash }/>,
component
:
<
BlockEpochRewards
heightOrHash=
{
heightOrHash
}
/>,
//
} : null,
}
:
null
,
].
filter
(
Boolean
)),
[
blockBlobTxsQuery
,
blockQuery
,
blockTxsQuery
,
blockWithdrawalsQuery
,
hasPagination
,
heightOrHash
]);
].
filter
(
Boolean
)),
[
blockBlobTxsQuery
,
blockQuery
,
blockTxsQuery
,
blockWithdrawalsQuery
,
hasPagination
,
heightOrHash
]);
let
pagination
;
let
pagination
;
...
...
ui/shared/EpochRewardTypeTag.tsx
View file @
a19110b6
import
{
Tooltip
}
from
'
@chakra-ui/react
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
import
type
{
EpochRewardsType
}
from
'
types/api/block
'
;
import
type
{
EpochRewardsType
}
from
'
types/api/block
'
;
import
Tag
from
'
ui/shared/chakra/Tag
'
;
import
{
Badge
}
from
'
toolkit/chakra/badge
'
;
import
{
Tooltip
}
from
'
toolkit/chakra/tooltip
'
;
type
Props
=
{
type
Props
=
{
type
:
EpochRewardsType
;
type
:
EpochRewardsType
;
...
@@ -39,10 +39,10 @@ const EpochRewardTypeTag = ({ type, isLoading }: Props) => {
...
@@ -39,10 +39,10 @@ const EpochRewardTypeTag = ({ type, isLoading }: Props) => {
const
{
text
,
label
,
color
}
=
TYPE_TAGS
[
type
];
const
{
text
,
label
,
color
}
=
TYPE_TAGS
[
type
];
return
(
return
(
<
Tooltip
label=
{
label
}
maxW=
"322px"
textAlign=
"center"
>
<
Tooltip
content=
{
label
}
>
<
Tag
colorScheme=
{
color
}
isL
oading=
{
isLoading
}
>
<
Badge
colorScheme=
{
color
}
l
oading=
{
isLoading
}
>
{
text
}
{
text
}
</
Tag
>
</
Badge
>
</
Tooltip
>
</
Tooltip
>
);
);
};
};
...
...
ui/shared/SocketNewItemsNotice.tsx
View file @
a19110b6
...
@@ -62,7 +62,6 @@ const SocketNewItemsNotice = chakra(({ children, className, url, num, alert, typ
...
@@ -62,7 +62,6 @@ const SocketNewItemsNotice = chakra(({ children, className, url, num, alert, typ
px=
{
4
}
px=
{
4
}
py=
"6px"
py=
"6px"
fontSize=
"sm"
fontSize=
"sm"
startElement=
{
null
}
>
>
{
alertContent
}
{
alertContent
}
</
Alert
>
</
Alert
>
...
...
ui/shared/TokenTransferSnippet/TokenTransferSnippet.tsx
View file @
a19110b6
...
@@ -9,8 +9,8 @@ import type {
...
@@ -9,8 +9,8 @@ import type {
Erc404TotalPayload
,
Erc404TotalPayload
,
}
from
'
types/api/tokenTransfer
'
;
}
from
'
types/api/tokenTransfer
'
;
import
{
Skeleton
}
from
'
toolkit/chakra/skeleton
'
;
import
AddressFromTo
from
'
ui/shared/address/AddressFromTo
'
;
import
AddressFromTo
from
'
ui/shared/address/AddressFromTo
'
;
import
Skeleton
from
'
ui/shared/chakra/Skeleton
'
;
import
TokenTransferSnippetFiat
from
'
./TokenTransferSnippetFiat
'
;
import
TokenTransferSnippetFiat
from
'
./TokenTransferSnippetFiat
'
;
import
TokenTransferSnippetNft
from
'
./TokenTransferSnippetNft
'
;
import
TokenTransferSnippetNft
from
'
./TokenTransferSnippetNft
'
;
...
@@ -26,7 +26,7 @@ const TokenTransferSnippet = ({ data, isLoading, noAddressIcons = true }: Props)
...
@@ -26,7 +26,7 @@ const TokenTransferSnippet = ({ data, isLoading, noAddressIcons = true }: Props)
const
content
=
(()
=>
{
const
content
=
(()
=>
{
if
(
isLoading
)
{
if
(
isLoading
)
{
return
<
Skeleton
w=
"250px"
h=
{
6
}
/>;
return
<
Skeleton
loading
w=
"250px"
h=
{
6
}
/>;
}
}
switch
(
data
.
token
?.
type
)
{
switch
(
data
.
token
?.
type
)
{
...
...
ui/snippets/header/alerts/MaintenanceAlert.tsx
View file @
a19110b6
...
@@ -10,7 +10,7 @@ const MaintenanceAlert = () => {
...
@@ -10,7 +10,7 @@ const MaintenanceAlert = () => {
}
}
return
(
return
(
<
Alert
status=
"neutral"
>
<
Alert
status=
"neutral"
showIcon
>
<
Box
<
Box
dangerouslySetInnerHTML=
{
{
__html
:
config
.
UI
.
maintenanceAlert
.
message
}
}
dangerouslySetInnerHTML=
{
{
__html
:
config
.
UI
.
maintenanceAlert
.
message
}
}
css=
{
{
css=
{
{
...
...
ui/withdrawals/beaconChain/BeaconChainWithdrawalsListItem.tsx
View file @
a19110b6
...
@@ -6,7 +6,7 @@ import type { WithdrawalsItem } from 'types/api/withdrawals';
...
@@ -6,7 +6,7 @@ import type { WithdrawalsItem } from 'types/api/withdrawals';
import
config
from
'
configs/app
'
;
import
config
from
'
configs/app
'
;
import
{
currencyUnits
}
from
'
lib/units
'
;
import
{
currencyUnits
}
from
'
lib/units
'
;
import
Skeleton
from
'
ui/shared/chakra/S
keleton
'
;
import
{
Skeleton
}
from
'
toolkit/chakra/s
keleton
'
;
import
CurrencyValue
from
'
ui/shared/CurrencyValue
'
;
import
CurrencyValue
from
'
ui/shared/CurrencyValue
'
;
import
AddressEntity
from
'
ui/shared/entities/address/AddressEntity
'
;
import
AddressEntity
from
'
ui/shared/entities/address/AddressEntity
'
;
import
BlockEntity
from
'
ui/shared/entities/block/BlockEntity
'
;
import
BlockEntity
from
'
ui/shared/entities/block/BlockEntity
'
;
...
@@ -36,12 +36,12 @@ const BeaconChainWithdrawalsListItem = ({ item, isLoading, view }: Props) => {
...
@@ -36,12 +36,12 @@ const BeaconChainWithdrawalsListItem = ({ item, isLoading, view }: Props) => {
<
ListItemMobileGrid
.
Label
isLoading=
{
isLoading
}
>
Index
</
ListItemMobileGrid
.
Label
>
<
ListItemMobileGrid
.
Label
isLoading=
{
isLoading
}
>
Index
</
ListItemMobileGrid
.
Label
>
<
ListItemMobileGrid
.
Value
>
<
ListItemMobileGrid
.
Value
>
<
Skeleton
isLoaded=
{
!
isLoading
}
display=
"inline-block"
>
{
item
.
index
}
</
Skeleton
>
<
Skeleton
loading=
{
isLoading
}
display=
"inline-block"
>
{
item
.
index
}
</
Skeleton
>
</
ListItemMobileGrid
.
Value
>
</
ListItemMobileGrid
.
Value
>
<
ListItemMobileGrid
.
Label
isLoading=
{
isLoading
}
>
Validator index
</
ListItemMobileGrid
.
Label
>
<
ListItemMobileGrid
.
Label
isLoading=
{
isLoading
}
>
Validator index
</
ListItemMobileGrid
.
Label
>
<
ListItemMobileGrid
.
Value
>
<
ListItemMobileGrid
.
Value
>
<
Skeleton
isLoaded=
{
!
isLoading
}
display=
"inline-block"
>
{
item
.
validator_index
}
</
Skeleton
>
<
Skeleton
loading=
{
isLoading
}
display=
"inline-block"
>
{
item
.
validator_index
}
</
Skeleton
>
</
ListItemMobileGrid
.
Value
>
</
ListItemMobileGrid
.
Value
>
{
view
!==
'
block
'
&&
(
{
view
!==
'
block
'
&&
(
...
...
ui/withdrawals/beaconChain/BeaconChainWithdrawalsTable.tsx
View file @
a19110b6
import
{
Table
,
Tbody
,
Th
,
Tr
}
from
'
@chakra-ui/react
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
import
type
{
AddressWithdrawalsItem
}
from
'
types/api/address
'
;
import
type
{
AddressWithdrawalsItem
}
from
'
types/api/address
'
;
...
@@ -7,7 +6,7 @@ import type { WithdrawalsItem } from 'types/api/withdrawals';
...
@@ -7,7 +6,7 @@ import type { WithdrawalsItem } from 'types/api/withdrawals';
import
config
from
'
configs/app
'
;
import
config
from
'
configs/app
'
;
import
useLazyRenderedList
from
'
lib/hooks/useLazyRenderedList
'
;
import
useLazyRenderedList
from
'
lib/hooks/useLazyRenderedList
'
;
import
{
default
as
Thead
}
from
'
ui/shared/TheadSticky
'
;
import
{
TableBody
,
TableColumnHeader
,
TableHeaderSticky
,
TableRoot
,
TableRow
}
from
'
toolkit/chakra/table
'
;
import
BeaconChainWithdrawalsTableItem
from
'
./BeaconChainWithdrawalsTableItem
'
;
import
BeaconChainWithdrawalsTableItem
from
'
./BeaconChainWithdrawalsTableItem
'
;
...
@@ -35,18 +34,18 @@ const BeaconChainWithdrawalsTable = ({ items, isLoading, top, view }: Props) =>
...
@@ -35,18 +34,18 @@ const BeaconChainWithdrawalsTable = ({ items, isLoading, top, view }: Props) =>
}
}
return
(
return
(
<
Table
style=
{
{
tableLayout
:
'
auto
'
}
}
minW=
"950px"
>
<
Table
Root
style=
{
{
tableLayout
:
'
auto
'
}
}
minW=
"950px"
>
<
T
head
top=
{
top
}
>
<
T
ableHeaderSticky
top=
{
top
}
>
<
T
r
>
<
T
ableRow
>
<
T
h
minW=
"140px"
>
Index
</
Th
>
<
T
ableColumnHeader
minW=
"140px"
>
Index
</
TableColumnHeader
>
<
T
h
minW=
"200px"
>
Validator index
</
Th
>
<
T
ableColumnHeader
minW=
"200px"
>
Validator index
</
TableColumnHeader
>
{
view
!==
'
block
'
&&
<
T
h
w=
"25%"
>
Block
</
Th
>
}
{
view
!==
'
block
'
&&
<
T
ableColumnHeader
w=
"25%"
>
Block
</
TableColumnHeader
>
}
{
view
!==
'
address
'
&&
<
T
h
w=
"25%"
>
To
</
Th
>
}
{
view
!==
'
address
'
&&
<
T
ableColumnHeader
w=
"25%"
>
To
</
TableColumnHeader
>
}
{
view
!==
'
block
'
&&
<
T
h
w=
"25%"
>
Age
</
Th
>
}
{
view
!==
'
block
'
&&
<
T
ableColumnHeader
w=
"25%"
>
Age
</
TableColumnHeader
>
}
<
T
h
w=
"25%"
>
{
`Value ${ feature.currency.symbol }`
}
</
Th
>
<
T
ableColumnHeader
w=
"25%"
>
{
`Value ${ feature.currency.symbol }`
}
</
TableColumnHeader
>
</
T
r
>
</
T
ableRow
>
</
T
head
>
</
T
ableHeaderSticky
>
<
T
b
ody
>
<
T
ableB
ody
>
{
view
===
'
list
'
&&
(
items
as
Array
<
WithdrawalsItem
>
).
slice
(
0
,
renderedItemsNum
).
map
((
item
,
index
)
=>
(
{
view
===
'
list
'
&&
(
items
as
Array
<
WithdrawalsItem
>
).
slice
(
0
,
renderedItemsNum
).
map
((
item
,
index
)
=>
(
<
BeaconChainWithdrawalsTableItem
key=
{
item
.
index
+
(
isLoading
?
String
(
index
)
:
''
)
}
item=
{
item
}
view=
"list"
isLoading=
{
isLoading
}
/>
<
BeaconChainWithdrawalsTableItem
key=
{
item
.
index
+
(
isLoading
?
String
(
index
)
:
''
)
}
item=
{
item
}
view=
"list"
isLoading=
{
isLoading
}
/>
))
}
))
}
...
@@ -56,9 +55,9 @@ const BeaconChainWithdrawalsTable = ({ items, isLoading, top, view }: Props) =>
...
@@ -56,9 +55,9 @@ const BeaconChainWithdrawalsTable = ({ items, isLoading, top, view }: Props) =>
{
view
===
'
block
'
&&
(
items
as
Array
<
BlockWithdrawalsItem
>
).
slice
(
0
,
renderedItemsNum
).
map
((
item
,
index
)
=>
(
{
view
===
'
block
'
&&
(
items
as
Array
<
BlockWithdrawalsItem
>
).
slice
(
0
,
renderedItemsNum
).
map
((
item
,
index
)
=>
(
<
BeaconChainWithdrawalsTableItem
key=
{
item
.
index
+
(
isLoading
?
String
(
index
)
:
''
)
}
item=
{
item
}
view=
"block"
isLoading=
{
isLoading
}
/>
<
BeaconChainWithdrawalsTableItem
key=
{
item
.
index
+
(
isLoading
?
String
(
index
)
:
''
)
}
item=
{
item
}
view=
"block"
isLoading=
{
isLoading
}
/>
))
}
))
}
<
tr
ref=
{
cutRef
}
/>
<
TableRow
ref=
{
cutRef
}
/>
</
T
b
ody
>
</
T
ableB
ody
>
</
Table
>
</
Table
Root
>
);
);
};
};
...
...
ui/withdrawals/beaconChain/BeaconChainWithdrawalsTableItem.tsx
View file @
a19110b6
import
{
Td
,
Tr
}
from
'
@chakra-ui/react
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
import
type
{
AddressWithdrawalsItem
}
from
'
types/api/address
'
;
import
type
{
AddressWithdrawalsItem
}
from
'
types/api/address
'
;
import
type
{
BlockWithdrawalsItem
}
from
'
types/api/block
'
;
import
type
{
BlockWithdrawalsItem
}
from
'
types/api/block
'
;
import
type
{
WithdrawalsItem
}
from
'
types/api/withdrawals
'
;
import
type
{
WithdrawalsItem
}
from
'
types/api/withdrawals
'
;
import
Skeleton
from
'
ui/shared/chakra/Skeleton
'
;
import
{
Skeleton
}
from
'
toolkit/chakra/skeleton
'
;
import
{
TableCell
,
TableRow
}
from
'
toolkit/chakra/table
'
;
import
CurrencyValue
from
'
ui/shared/CurrencyValue
'
;
import
CurrencyValue
from
'
ui/shared/CurrencyValue
'
;
import
AddressEntity
from
'
ui/shared/entities/address/AddressEntity
'
;
import
AddressEntity
from
'
ui/shared/entities/address/AddressEntity
'
;
import
BlockEntity
from
'
ui/shared/entities/block/BlockEntity
'
;
import
BlockEntity
from
'
ui/shared/entities/block/BlockEntity
'
;
...
@@ -24,15 +24,15 @@ type Props = ({
...
@@ -24,15 +24,15 @@ type Props = ({
const
BeaconChainWithdrawalsTableItem
=
({
item
,
view
,
isLoading
}:
Props
)
=>
{
const
BeaconChainWithdrawalsTableItem
=
({
item
,
view
,
isLoading
}:
Props
)
=>
{
return
(
return
(
<
T
r
>
<
T
ableRow
>
<
T
d
verticalAlign=
"middle"
>
<
T
ableCell
verticalAlign=
"middle"
>
<
Skeleton
isLoaded=
{
!
isLoading
}
display=
"inline-block"
>
{
item
.
index
}
</
Skeleton
>
<
Skeleton
loading=
{
isLoading
}
display=
"inline-block"
>
{
item
.
index
}
</
Skeleton
>
</
T
d
>
</
T
ableCell
>
<
T
d
verticalAlign=
"middle"
>
<
T
ableCell
verticalAlign=
"middle"
>
<
Skeleton
isLoaded=
{
!
isLoading
}
display=
"inline-block"
>
{
item
.
validator_index
}
</
Skeleton
>
<
Skeleton
loading=
{
isLoading
}
display=
"inline-block"
>
{
item
.
validator_index
}
</
Skeleton
>
</
T
d
>
</
T
ableCell
>
{
view
!==
'
block
'
&&
(
{
view
!==
'
block
'
&&
(
<
T
d
verticalAlign=
"middle"
>
<
T
ableCell
verticalAlign=
"middle"
>
<
BlockEntity
<
BlockEntity
number=
{
item
.
block_number
}
number=
{
item
.
block_number
}
isLoading=
{
isLoading
}
isLoading=
{
isLoading
}
...
@@ -40,31 +40,31 @@ const BeaconChainWithdrawalsTableItem = ({ item, view, isLoading }: Props) => {
...
@@ -40,31 +40,31 @@ const BeaconChainWithdrawalsTableItem = ({ item, view, isLoading }: Props) => {
lineHeight=
{
5
}
lineHeight=
{
5
}
noIcon
noIcon
/>
/>
</
T
d
>
</
T
ableCell
>
)
}
)
}
{
view
!==
'
address
'
&&
(
{
view
!==
'
address
'
&&
(
<
T
d
verticalAlign=
"middle"
>
<
T
ableCell
verticalAlign=
"middle"
>
<
AddressEntity
<
AddressEntity
address=
{
item
.
receiver
}
address=
{
item
.
receiver
}
isLoading=
{
isLoading
}
isLoading=
{
isLoading
}
truncation=
"constant"
truncation=
"constant"
/>
/>
</
T
d
>
</
T
ableCell
>
)
}
)
}
{
view
!==
'
block
'
&&
(
{
view
!==
'
block
'
&&
(
<
T
d
verticalAlign=
"middle"
pr=
{
12
}
>
<
T
ableCell
verticalAlign=
"middle"
pr=
{
12
}
>
<
TimeAgoWithTooltip
<
TimeAgoWithTooltip
timestamp=
{
item
.
timestamp
}
timestamp=
{
item
.
timestamp
}
isLoading=
{
isLoading
}
isLoading=
{
isLoading
}
color=
"text_secondary"
color=
"text_secondary"
display=
"inline-block"
display=
"inline-block"
/>
/>
</
T
d
>
</
T
ableCell
>
)
}
)
}
<
T
d
verticalAlign=
"middle"
>
<
T
ableCell
verticalAlign=
"middle"
>
<
CurrencyValue
value=
{
item
.
amount
}
isLoading=
{
isLoading
}
/>
<
CurrencyValue
value=
{
item
.
amount
}
isLoading=
{
isLoading
}
/>
</
T
d
>
</
T
ableCell
>
</
T
r
>
</
T
ableRow
>
);
);
};
};
...
...
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