bridge_ui: tvl >1b decimals
This commit is contained in:
parent
07446e2e23
commit
9a0b2240d9
|
@ -46,6 +46,7 @@ const useStyles = makeStyles((theme) => ({
|
||||||
},
|
},
|
||||||
totalsBox: {
|
totalsBox: {
|
||||||
display: "flex",
|
display: "flex",
|
||||||
|
flexWrap: "wrap",
|
||||||
width: "100%",
|
width: "100%",
|
||||||
justifyContent: "space-evenly",
|
justifyContent: "space-evenly",
|
||||||
alignItems: "center",
|
alignItems: "center",
|
||||||
|
@ -53,6 +54,8 @@ const useStyles = makeStyles((theme) => ({
|
||||||
totalContainer: {
|
totalContainer: {
|
||||||
display: "flex",
|
display: "flex",
|
||||||
alignItems: "flex-end",
|
alignItems: "flex-end",
|
||||||
|
paddingLeft: theme.spacing(0.5),
|
||||||
|
paddingRight: theme.spacing(0.5),
|
||||||
paddingBottom: 1, // line up with left text bottom
|
paddingBottom: 1, // line up with left text bottom
|
||||||
[theme.breakpoints.down("sm")]: {
|
[theme.breakpoints.down("sm")]: {
|
||||||
marginTop: theme.spacing(1),
|
marginTop: theme.spacing(1),
|
||||||
|
|
|
@ -196,7 +196,9 @@ const StatsRoot: React.FC<any> = () => {
|
||||||
tvl.data.forEach((val) => {
|
tvl.data.forEach((val) => {
|
||||||
if (val.totalValue) sum += val.totalValue;
|
if (val.totalValue) sum += val.totalValue;
|
||||||
});
|
});
|
||||||
return numeral(sum).format("0 a").toUpperCase();
|
return numeral(sum)
|
||||||
|
.format(sum >= 1000000000 ? "0.000 a" : "0 a")
|
||||||
|
.toUpperCase();
|
||||||
}
|
}
|
||||||
}, [tvl.data]);
|
}, [tvl.data]);
|
||||||
|
|
||||||
|
@ -250,15 +252,15 @@ const StatsRoot: React.FC<any> = () => {
|
||||||
)}
|
)}
|
||||||
</>
|
</>
|
||||||
</Paper>
|
</Paper>
|
||||||
<Paper className={classes.mainPaper}>
|
|
||||||
<NFTStats />
|
|
||||||
</Paper>
|
|
||||||
<Paper className={classes.mainPaper}>
|
<Paper className={classes.mainPaper}>
|
||||||
<TransactionMetrics />
|
<TransactionMetrics />
|
||||||
</Paper>
|
</Paper>
|
||||||
<Paper className={classes.mainPaper}>
|
<Paper className={classes.mainPaper}>
|
||||||
<CustodyAddresses />
|
<CustodyAddresses />
|
||||||
</Paper>
|
</Paper>
|
||||||
|
<Paper className={classes.mainPaper}>
|
||||||
|
<NFTStats />
|
||||||
|
</Paper>
|
||||||
</Container>
|
</Container>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue