diff --git a/src/components/TimestampAge.tsx b/src/components/TimestampAge.tsx index 7849c14..20f4784 100644 --- a/src/components/TimestampAge.tsx +++ b/src/components/TimestampAge.tsx @@ -1,11 +1,14 @@ import React from "react"; type TimestampAgeProps = { + now?: number | undefined; timestamp: number; }; -const TimestampAge: React.FC = ({ timestamp }) => { - const now = Date.now() / 1000; +const TimestampAge: React.FC = ({ now, timestamp }) => { + if (now === undefined) { + now = Date.now() / 1000; + } let diff = now - timestamp; let desc = ""; diff --git a/src/special/BlockRecord.tsx b/src/special/BlockRecord.tsx index 6263a8e..22d3943 100644 --- a/src/special/BlockRecord.tsx +++ b/src/special/BlockRecord.tsx @@ -1,6 +1,7 @@ import { ethers } from "ethers"; import React from "react"; import BlockLink from "../components/BlockLink"; +import TimestampAge from "../components/TimestampAge"; import { ExtendedBlock } from "../useErigonHooks"; const ELASTICITY_MULTIPLIER = 2; @@ -48,6 +49,9 @@ const BlockRecord: React.FC = ({ block }) => { )}{" "} Gwei +
+ +
); }; diff --git a/src/special/Blocks.tsx b/src/special/Blocks.tsx index 575845f..0fd4525 100644 --- a/src/special/Blocks.tsx +++ b/src/special/Blocks.tsx @@ -69,6 +69,7 @@ const Blocks: React.FC = ({ latestBlock }) => { Burnt fees +
Age
@@ -89,6 +90,9 @@ const Blocks: React.FC = ({ latestBlock }) => {
+
+
+
{blocks.map((b, i) => (