Skip to content

Commit 966dff6

Browse files
committed
spin
1 parent 9ee3b3e commit 966dff6

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

src/app/page.tsx

+8-5
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
// }
88

99
"use client";
10-
10+
import "./blocks/odo.css";
1111
import React, { useEffect, useState } from "react";
1212
import ExplorerNav from "@/components/ExplorerNav";
1313
import timeAgo from "@/lib/ConvertTime";
@@ -72,6 +72,7 @@ import {
7272
import { day } from "@/lib/millis";
7373
import { HashLoader } from "react-spinners";
7474
import { Block, Transfer } from "@/graphql/types";
75+
import ReactOdometer from "react-odometerjs";
7576

7677
function frequency(d: Date[]): number[] {
7778
let map = Array<number>(30).fill(0);
@@ -94,7 +95,7 @@ const Explorer = () => {
9495
{
9596
id: 1,
9697
title: "Finalized Blocks",
97-
value: totalBlock.toLocaleString(),
98+
value: totalBlock,
9899
icon: <Blocks size={30} color="#00A4E5" />,
99100
},
100101
// {
@@ -112,7 +113,7 @@ const Explorer = () => {
112113
{
113114
id: 4,
114115
title: "Signed Extrinsics",
115-
value: extrinsic,
116+
value: parseInt(extrinsic.replaceAll(",", "")),
116117
icon: <History color="#00A4E5" size={30} />,
117118
},
118119
];
@@ -126,7 +127,7 @@ const Explorer = () => {
126127
search={true}
127128
selIcon="/sel-logo-blue.png"
128129
/>
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">
130131
<section className="mt-6 grid grid-cols-2 md:grid-cols-3 gap-2">
131132
{data1.map((data) => {
132133
return (
@@ -135,7 +136,9 @@ const Explorer = () => {
135136
{data.icon}
136137
<div className="flex flex-col mt-6">
137138
<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>
139142
</div>
140143
</CardBody>
141144
</Card>

0 commit comments

Comments
 (0)