7
7
// }
8
8
9
9
"use client" ;
10
-
10
+ import "./blocks/odo.css" ;
11
11
import React , { useEffect , useState } from "react" ;
12
12
import ExplorerNav from "@/components/ExplorerNav" ;
13
13
import timeAgo from "@/lib/ConvertTime" ;
@@ -72,6 +72,7 @@ import {
72
72
import { day } from "@/lib/millis" ;
73
73
import { HashLoader } from "react-spinners" ;
74
74
import { Block , Transfer } from "@/graphql/types" ;
75
+ import ReactOdometer from "react-odometerjs" ;
75
76
76
77
function frequency ( d : Date [ ] ) : number [ ] {
77
78
let map = Array < number > ( 30 ) . fill ( 0 ) ;
@@ -94,7 +95,7 @@ const Explorer = () => {
94
95
{
95
96
id : 1 ,
96
97
title : "Finalized Blocks" ,
97
- value : totalBlock . toLocaleString ( ) ,
98
+ value : totalBlock ,
98
99
icon : < Blocks size = { 30 } color = "#00A4E5" /> ,
99
100
} ,
100
101
// {
@@ -112,7 +113,7 @@ const Explorer = () => {
112
113
{
113
114
id : 4 ,
114
115
title : "Signed Extrinsics" ,
115
- value : extrinsic ,
116
+ value : parseInt ( extrinsic . replaceAll ( "," , "" ) ) ,
116
117
icon : < History color = "#00A4E5" size = { 30 } /> ,
117
118
} ,
118
119
] ;
@@ -126,7 +127,7 @@ const Explorer = () => {
126
127
search = { true }
127
128
selIcon = "/sel-logo-blue.png"
128
129
/>
129
- < div className = "px-4 sm:px-20 lg:px-80 mt-6" >
130
+ < div className = "px-4 sm:px-20 lg:px-40 mt-6" >
130
131
< section className = "mt-6 grid grid-cols-2 md:grid-cols-3 gap-2" >
131
132
{ data1 . map ( ( data ) => {
132
133
return (
@@ -135,7 +136,9 @@ const Explorer = () => {
135
136
{ data . icon }
136
137
< div className = "flex flex-col mt-6" >
137
138
< p className = "text-sm text-default-500" > { data . title } </ p >
138
- < p className = "text-xl md:text-2xl " > { data . value } </ p >
139
+ < p className = "text-xl md:text-2xl " >
140
+ < ReactOdometer value = { data . value } /> { " " }
141
+ </ p >
139
142
</ div >
140
143
</ CardBody >
141
144
</ Card >
0 commit comments