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
bd68f62f
Commit
bd68f62f
authored
Jan 04, 2024
by
isstuev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
null gas prices
parent
a078553c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
8 deletions
+8
-8
stats.ts
types/api/stats.ts
+3
-3
Stats.tsx
ui/home/Stats.tsx
+1
-1
GasInfoTooltipContent.tsx
ui/shared/GasInfoTooltipContent/GasInfoTooltipContent.tsx
+3
-3
TopBarStats.tsx
ui/snippets/topBar/TopBarStats.tsx
+1
-1
No files found.
types/api/stats.ts
View file @
bd68f62f
...
@@ -16,9 +16,9 @@ export type HomeStats = {
...
@@ -16,9 +16,9 @@ export type HomeStats = {
}
}
export
type
GasPrices
=
{
export
type
GasPrices
=
{
average
:
number
;
average
:
number
|
null
;
fast
:
number
;
fast
:
number
|
null
;
slow
:
number
;
slow
:
number
|
null
;
}
}
export
type
Counters
=
{
export
type
Counters
=
{
...
...
ui/home/Stats.tsx
View file @
bd68f62f
...
@@ -92,7 +92,7 @@ const Stats = () => {
...
@@ -92,7 +92,7 @@ const Stats = () => {
<
StatsItem
<
StatsItem
icon=
"gas"
icon=
"gas"
title=
"Gas tracker"
title=
"Gas tracker"
value=
{
`${ Number(data.gas_prices.average).toLocaleString() } Gwei`
}
value=
{
data
.
gas_prices
.
average
!==
null
?
`${ Number(data.gas_prices.average).toLocaleString() } Gwei`
:
'
N/A
'
}
_last=
{
isOdd
?
lastItemTouchStyle
:
undefined
}
_last=
{
isOdd
?
lastItemTouchStyle
:
undefined
}
tooltipLabel=
{
gasLabel
}
tooltipLabel=
{
gasLabel
}
isLoading=
{
isPlaceholderData
}
isLoading=
{
isPlaceholderData
}
...
...
ui/shared/GasInfoTooltipContent/GasInfoTooltipContent.tsx
View file @
bd68f62f
...
@@ -11,11 +11,11 @@ const GasInfoTooltipContent = ({ gasPrices }: {gasPrices: GasPrices}) => {
...
@@ -11,11 +11,11 @@ const GasInfoTooltipContent = ({ gasPrices }: {gasPrices: GasPrices}) => {
return
(
return
(
<
Grid
templateColumns=
"repeat(2, max-content)"
rowGap=
{
2
}
columnGap=
{
4
}
padding=
{
4
}
fontSize=
"xs"
>
<
Grid
templateColumns=
"repeat(2, max-content)"
rowGap=
{
2
}
columnGap=
{
4
}
padding=
{
4
}
fontSize=
"xs"
>
<
GridItem
{
...
nameStyleProps
}
>
Slow
</
GridItem
>
<
GridItem
{
...
nameStyleProps
}
>
Slow
</
GridItem
>
<
GridItem
>
{
`${ gasPrices.slow } Gwei`
}
</
GridItem
>
<
GridItem
>
{
gasPrices
.
slow
!==
null
?
`${ gasPrices.slow } Gwei`
:
'
N/A
'
}
</
GridItem
>
<
GridItem
{
...
nameStyleProps
}
>
Average
</
GridItem
>
<
GridItem
{
...
nameStyleProps
}
>
Average
</
GridItem
>
<
GridItem
>
{
`${ gasPrices.average } Gwei`
}
</
GridItem
>
<
GridItem
>
{
gasPrices
.
average
!==
null
?
`${ gasPrices.average } Gwei`
:
'
N/A
'
}
</
GridItem
>
<
GridItem
{
...
nameStyleProps
}
>
Fast
</
GridItem
>
<
GridItem
{
...
nameStyleProps
}
>
Fast
</
GridItem
>
<
GridItem
>
{
`${ gasPrices.fast } Gwei`
}
</
GridItem
>
<
GridItem
>
{
gasPrices
.
fast
!==
null
?
`${ gasPrices.fast } Gwei`
:
'
N/A
'
}
</
GridItem
>
</
Grid
>
</
Grid
>
);
);
};
};
...
...
ui/snippets/topBar/TopBarStats.tsx
View file @
bd68f62f
...
@@ -40,7 +40,7 @@ const TopBarStats = () => {
...
@@ -40,7 +40,7 @@ const TopBarStats = () => {
</
Skeleton
>
</
Skeleton
>
)
}
)
}
{
data
?.
coin_price
&&
config
.
UI
.
homepage
.
showGasTracker
&&
<
TextSeparator
color=
"divider"
/>
}
{
data
?.
coin_price
&&
config
.
UI
.
homepage
.
showGasTracker
&&
<
TextSeparator
color=
"divider"
/>
}
{
data
?.
gas_prices
&&
config
.
UI
.
homepage
.
showGasTracker
&&
(
{
data
?.
gas_prices
&&
data
.
gas_prices
.
average
!==
null
&&
config
.
UI
.
homepage
.
showGasTracker
&&
(
<
Skeleton
isLoaded=
{
!
isPlaceholderData
}
>
<
Skeleton
isLoaded=
{
!
isPlaceholderData
}
>
<
chakra
.
span
color=
"text_secondary"
>
Gas
</
chakra
.
span
>
<
chakra
.
span
color=
"text_secondary"
>
Gas
</
chakra
.
span
>
<
LightMode
>
<
LightMode
>
...
...
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