diff --git a/tools/tenscan/frontend/src/components/modules/dashboard/index.tsx b/tools/tenscan/frontend/src/components/modules/dashboard/index.tsx index 4cef33368a..5c3e4b9010 100644 --- a/tools/tenscan/frontend/src/components/modules/dashboard/index.tsx +++ b/tools/tenscan/frontend/src/components/modules/dashboard/index.tsx @@ -21,19 +21,19 @@ import { useBatchesService } from "@/src/services/useBatchesService"; import TruncatedAddress from "../common/truncated-address"; import { useContractsService } from "@/src/services/useContractsService"; import { Skeleton } from "@/src/components/ui/skeleton"; -import { RecentBlocks } from "./recent-blocks"; -import { useBlocksService } from "@/src/services/useBlocksService"; import AnalyticsCard from "./analytics-card"; import Link from "next/link"; import { cn, formatNumber } from "@/src/lib/utils"; import { Badge } from "../../ui/badge"; import { BlocksIcon } from "lucide-react"; +import { useRollupsService } from "@/src/services/useRollupsService"; +import { RecentRollups } from "./recent-rollups"; export default function Dashboard() { const { price, transactions, transactionCount } = useTransactionsService(); const { contractCount } = useContractsService(); const { batches, latestBatch } = useBatchesService(); - const { blocks } = useBlocksService(); + const { rollups } = useRollupsService(); const DASHBOARD_DATA = [ { @@ -94,10 +94,10 @@ export default function Dashboard() { const RECENT_DATA = [ { - title: "Recent Blocks", - data: blocks, - component: , - goTo: "/blocks", + title: "Recent Rollups", + data: rollups, + component: , + goTo: "/rollups", className: "col-span-1 md:col-span-2 lg:col-span-3", }, { diff --git a/tools/tenscan/frontend/src/components/modules/dashboard/recent-blocks.tsx b/tools/tenscan/frontend/src/components/modules/dashboard/recent-rollups.tsx similarity index 55% rename from tools/tenscan/frontend/src/components/modules/dashboard/recent-blocks.tsx rename to tools/tenscan/frontend/src/components/modules/dashboard/recent-rollups.tsx index 9ead81d7bc..ac5e55b090 100644 --- a/tools/tenscan/frontend/src/components/modules/dashboard/recent-blocks.tsx +++ b/tools/tenscan/frontend/src/components/modules/dashboard/recent-rollups.tsx @@ -1,26 +1,32 @@ import TruncatedAddress from "../common/truncated-address"; import { formatTimeAgo } from "@/src/lib/utils"; import { Avatar, AvatarFallback } from "@/src/components/ui/avatar"; -import { Block } from "@/src/types/interfaces/BlockInterfaces"; +import { + Rollup, + RollupsResponse, +} from "@/src/types/interfaces/RollupInterfaces"; +import Link from "next/link"; -export function RecentBlocks({ blocks }: { blocks: any }) { +export function RecentRollups({ rollups }: { rollups: any }) { return (
- {blocks?.result?.BlocksData.map((block: Block, i: number) => ( + {rollups?.result?.RollupsData?.map((rollup: Rollup, i: number) => (
- BK + RP

- #{Number(block?.blockHeader?.number)} + #{Number(rollup?.ID)}

- {formatTimeAgo(block?.blockHeader?.timestamp)} + {formatTimeAgo(rollup?.Timestamp)}

- + + +
))} diff --git a/tools/tenscan/frontend/src/components/modules/rollups/columns.tsx b/tools/tenscan/frontend/src/components/modules/rollups/columns.tsx index 9975b214f3..1058c6c1e3 100644 --- a/tools/tenscan/frontend/src/components/modules/rollups/columns.tsx +++ b/tools/tenscan/frontend/src/components/modules/rollups/columns.tsx @@ -3,7 +3,7 @@ import { ColumnDef } from "@tanstack/react-table"; import { DataTableColumnHeader } from "../common/data-table/data-table-column-header"; import TruncatedAddress from "../common/truncated-address"; -import { formatNumber, formatTimeAgo } from "@/src/lib/utils"; +import { formatTimeAgo } from "@/src/lib/utils"; import Link from "next/link"; import { EyeOpenIcon } from "@radix-ui/react-icons"; import { Rollup } from "@/src/types/interfaces/RollupInterfaces"; @@ -76,7 +76,7 @@ export const columns: ColumnDef[] = [ { accessorKey: "FirstSeq", header: ({ column }) => ( - + ), cell: ({ row }) => { return ( @@ -98,7 +98,7 @@ export const columns: ColumnDef[] = [ { accessorKey: "LastSeq", header: ({ column }) => ( - + ), cell: ({ row }) => { return ( diff --git a/tools/tenscan/frontend/src/components/modules/rollups/rollup-details.tsx b/tools/tenscan/frontend/src/components/modules/rollups/rollup-details.tsx index b98da87006..e618cd16d1 100644 --- a/tools/tenscan/frontend/src/components/modules/rollups/rollup-details.tsx +++ b/tools/tenscan/frontend/src/components/modules/rollups/rollup-details.tsx @@ -44,7 +44,7 @@ export function RollupDetailsComponent({ value={} />