diff --git a/tools/tenscan/frontend/pages/batches/[hash].tsx b/tools/tenscan/frontend/pages/batches/[hash].tsx index 964444aa77..4a4f3edbe1 100644 --- a/tools/tenscan/frontend/pages/batches/[hash].tsx +++ b/tools/tenscan/frontend/pages/batches/[hash].tsx @@ -9,6 +9,7 @@ import { CardDescription, } from "@/src/components/ui/card"; import { Skeleton } from "@/src/components/ui/skeleton"; +import { formatNumber } from "@/src/lib/utils"; import { useQuery } from "@tanstack/react-query"; import { useRouter } from "next/router"; @@ -30,9 +31,12 @@ export default function Batch() { ) : batchDetails ? ( - Batch #{Number(batchDetails?.Header?.number)} + + Batch #{formatNumber(batchDetails?.Header?.number)} + - Overview of the batch #{Number(batchDetails?.Header?.number)} + Overview of the batch # + {formatNumber(batchDetails?.Header?.number)} diff --git a/tools/tenscan/frontend/pages/batches/index.tsx b/tools/tenscan/frontend/pages/batches/index.tsx index 7d55033070..fd0b27f098 100644 --- a/tools/tenscan/frontend/pages/batches/index.tsx +++ b/tools/tenscan/frontend/pages/batches/index.tsx @@ -4,6 +4,7 @@ import { DataTable } from "@/src/components/modules/common/data-table/data-table import Layout from "@/src/components/layouts/default-layout"; import { Metadata } from "next"; import { useBatchesService } from "@/src/services/useBatchesService"; +import { formatNumber } from "@/src/lib/utils"; export const metadata: Metadata = { title: "Batches", @@ -29,7 +30,7 @@ export default function Batches() {

Batches

- {Total} Batches found. + {formatNumber(Total)} Batches found.

diff --git a/tools/tenscan/frontend/pages/blocks/index.tsx b/tools/tenscan/frontend/pages/blocks/index.tsx index 8e3af812c0..566ddbc3e0 100644 --- a/tools/tenscan/frontend/pages/blocks/index.tsx +++ b/tools/tenscan/frontend/pages/blocks/index.tsx @@ -4,6 +4,7 @@ import { DataTable } from "@/src/components/modules/common/data-table/data-table import Layout from "@/src/components/layouts/default-layout"; import { Metadata } from "next"; import { useBlocksService } from "@/src/services/useBlocksService"; +import { formatNumber } from "@/src/lib/utils"; export const metadata: Metadata = { title: "Blocks", @@ -30,7 +31,7 @@ export default function Blocks() {

Blocks

- {Total} Blocks found. + {formatNumber(Total)} Blocks found.

diff --git a/tools/tenscan/frontend/pages/transactions/index.tsx b/tools/tenscan/frontend/pages/transactions/index.tsx index 2e171957b7..06ca008bb8 100644 --- a/tools/tenscan/frontend/pages/transactions/index.tsx +++ b/tools/tenscan/frontend/pages/transactions/index.tsx @@ -4,6 +4,7 @@ import { DataTable } from "@/src/components/modules/common/data-table/data-table import Layout from "@/src/components/layouts/default-layout"; import { useTransactionsService } from "@/src/services/useTransactionsService"; import { Metadata } from "next"; +import { formatNumber } from "@/src/lib/utils"; export const metadata: Metadata = { title: "Transactions", @@ -30,7 +31,7 @@ export default function Transactions() {

Transactions

- {Total} Transactions found. + {formatNumber(Total)} Transactions found.

diff --git a/tools/tenscan/frontend/src/components/modules/batches/batch-details.tsx b/tools/tenscan/frontend/src/components/modules/batches/batch-details.tsx index c6c2edf8d5..e8ebe385c6 100644 --- a/tools/tenscan/frontend/src/components/modules/batches/batch-details.tsx +++ b/tools/tenscan/frontend/src/components/modules/batches/batch-details.tsx @@ -1,7 +1,7 @@ import { Separator } from "@/src/components/ui/separator"; import TruncatedAddress from "../common/truncated-address"; import KeyValueItem, { KeyValueList } from "@/src/components/ui/key-value"; -import { formatTimeAgo } from "@/src/lib/utils"; +import { formatNumber, formatTimeAgo } from "@/src/lib/utils"; import { Badge } from "@/src/components/ui/badge"; import { BatchDetails } from "@/src/types/interfaces/BatchInterfaces"; @@ -15,7 +15,7 @@ export function BatchDetailsComponent({ diff --git a/tools/tenscan/frontend/src/components/modules/batches/columns.tsx b/tools/tenscan/frontend/src/components/modules/batches/columns.tsx index 76ea0eafa7..8ee9be34fc 100644 --- a/tools/tenscan/frontend/src/components/modules/batches/columns.tsx +++ b/tools/tenscan/frontend/src/components/modules/batches/columns.tsx @@ -4,10 +4,11 @@ import { ColumnDef } from "@tanstack/react-table"; import { DataTableColumnHeader } from "../common/data-table/data-table-column-header"; import TruncatedAddress from "../common/truncated-address"; -import { formatTimeAgo } from "@/src/lib/utils"; +import { formatNumber, formatTimeAgo } from "@/src/lib/utils"; import { Batch } from "@/src/types/interfaces/BatchInterfaces"; import { EyeOpenIcon } from "@radix-ui/react-icons"; import Link from "next/link"; +import { Badge } from "../../ui/badge"; export const columns: ColumnDef[] = [ { @@ -19,7 +20,7 @@ export const columns: ColumnDef[] = [ return (
- {Number(row.getValue("number"))} + #{formatNumber(row.getValue("number"))}
); @@ -55,7 +56,9 @@ export const columns: ColumnDef[] = [ return (
- {Number(row.getValue("gasUsed"))} + + {formatNumber(row.getValue("gasUsed"))} +
); @@ -72,7 +75,7 @@ export const columns: ColumnDef[] = [ return (
- {Number(row.getValue("gasLimit"))} + {formatNumber(row.getValue("gasLimit"))}
); diff --git a/tools/tenscan/frontend/src/components/modules/blocks/columns.tsx b/tools/tenscan/frontend/src/components/modules/blocks/columns.tsx index edf1db25db..cca5fe8736 100644 --- a/tools/tenscan/frontend/src/components/modules/blocks/columns.tsx +++ b/tools/tenscan/frontend/src/components/modules/blocks/columns.tsx @@ -5,7 +5,7 @@ import { ColumnDef } from "@tanstack/react-table"; import { DataTableColumnHeader } from "../common/data-table/data-table-column-header"; import { Block, BlockHeader } from "@/src/types/interfaces/BlockInterfaces"; import TruncatedAddress from "../common/truncated-address"; -import { formatTimeAgo } from "@/src/lib/utils"; +import { formatNumber, formatTimeAgo } from "@/src/lib/utils"; import { Badge } from "../../ui/badge"; import ExternalLink from "../../ui/external-link"; import { externalLinks } from "@/src/routes"; @@ -22,7 +22,7 @@ export const columns: ColumnDef[] = [ return (
- {Number(blockHeader?.number)} + {formatNumber(blockHeader?.number)}
); @@ -76,7 +76,9 @@ export const columns: ColumnDef[] = [ return (
- {Number(blockHeader?.gasUsed)} + + {formatNumber(blockHeader?.gasUsed)} +
); @@ -94,7 +96,7 @@ export const columns: ColumnDef[] = [ return (
- {Number(blockHeader?.gasLimit)} + {formatNumber(blockHeader?.gasLimit)}
); diff --git a/tools/tenscan/frontend/src/components/modules/common/data-table/data-table-pagination.tsx b/tools/tenscan/frontend/src/components/modules/common/data-table/data-table-pagination.tsx index a0ed85998c..45ce947a9f 100644 --- a/tools/tenscan/frontend/src/components/modules/common/data-table/data-table-pagination.tsx +++ b/tools/tenscan/frontend/src/components/modules/common/data-table/data-table-pagination.tsx @@ -14,6 +14,7 @@ import { SelectTrigger, SelectValue, } from "@/src/components/ui/select"; +import { formatNumber } from "@/src/lib/utils"; interface DataTablePaginationProps { table: Table; @@ -50,8 +51,8 @@ export function DataTablePagination({
- Page {table.getState().pagination.pageIndex + 1} of{" "} - {table.getPageCount()} + Page {formatNumber(table.getState().pagination.pageIndex + 1)} of{" "} + {formatNumber(table.getPageCount())}