diff --git a/explorer/src/components/account/TokenHistoryCard.tsx b/explorer/src/components/account/TokenHistoryCard.tsx index 484b14b72..1290be8ac 100644 --- a/explorer/src/components/account/TokenHistoryCard.tsx +++ b/explorer/src/components/account/TokenHistoryCard.tsx @@ -17,6 +17,7 @@ import { ErrorCard } from "components/common/ErrorCard"; import { LoadingCard } from "components/common/LoadingCard"; import { Signature } from "components/common/Signature"; import { Address } from "components/common/Address"; +import { Slot } from "components/common/Slot"; import { useTransactionDetails } from "providers/transactions"; import { useFetchTransactionDetails } from "providers/transactions/details"; import { coerce } from "superstruct"; @@ -249,8 +250,8 @@ function TokenTransactionRow({ return ( - - {tx.slot.toLocaleString("en-US")} + + @@ -288,7 +289,9 @@ function TokenTransactionRow({ return ( - {tx.slot.toLocaleString("en-US")} + + + {statusText} diff --git a/explorer/src/components/account/TransactionHistoryCard.tsx b/explorer/src/components/account/TransactionHistoryCard.tsx index 49db873ca..cfd6a5120 100644 --- a/explorer/src/components/account/TransactionHistoryCard.tsx +++ b/explorer/src/components/account/TransactionHistoryCard.tsx @@ -6,6 +6,7 @@ import { useFetchAccountHistory } from "providers/accounts/history"; import { Signature } from "components/common/Signature"; import { ErrorCard } from "components/common/ErrorCard"; import { LoadingCard } from "components/common/LoadingCard"; +import { Slot } from "components/common/Slot"; export function TransactionHistoryCard({ pubkey }: { pubkey: PublicKey }) { const address = pubkey.toBase58(); @@ -70,7 +71,9 @@ export function TransactionHistoryCard({ pubkey }: { pubkey: PublicKey }) { detailsList.push( - {slot.toLocaleString("en-US")} + + + diff --git a/explorer/src/components/common/Slot.tsx b/explorer/src/components/common/Slot.tsx new file mode 100644 index 000000000..96703d1a4 --- /dev/null +++ b/explorer/src/components/common/Slot.tsx @@ -0,0 +1,8 @@ +import React from "react"; + +type Props = { + slot: number; +}; +export function Slot({ slot }: Props) { + return {slot.toLocaleString("en-US")}; +} diff --git a/explorer/src/pages/ClusterStatsPage.tsx b/explorer/src/pages/ClusterStatsPage.tsx index ca71f61c0..7cb8c701a 100644 --- a/explorer/src/pages/ClusterStatsPage.tsx +++ b/explorer/src/pages/ClusterStatsPage.tsx @@ -1,6 +1,7 @@ import React from "react"; import { TableCardBody } from "components/common/TableCardBody"; +import { Slot } from "components/common/Slot"; import { useDashboardInfo, usePerformanceInfo, @@ -70,18 +71,21 @@ function StatsCardBody() { slotsInEpoch - slotIndex, hourlyBlockTime ); - const blockHeight = epochInfo.blockHeight.toLocaleString("en-US"); - const currentSlot = epochInfo.absoluteSlot.toLocaleString("en-US"); + const { blockHeight, absoluteSlot } = epochInfo; return ( Slot - {currentSlot} + + + Block height - {blockHeight} + + + Block time diff --git a/explorer/src/pages/TransactionDetailsPage.tsx b/explorer/src/pages/TransactionDetailsPage.tsx index 02a10a030..ba1c076bc 100644 --- a/explorer/src/pages/TransactionDetailsPage.tsx +++ b/explorer/src/pages/TransactionDetailsPage.tsx @@ -20,6 +20,7 @@ import { StakeDetailsCard } from "components/instruction/stake/StakeDetailsCard" import { ErrorCard } from "components/common/ErrorCard"; import { LoadingCard } from "components/common/LoadingCard"; import { TableCardBody } from "components/common/TableCardBody"; +import { Slot } from "components/common/Slot"; import { displayTimestamp } from "utils/date"; import { InfoTooltip } from "components/common/InfoTooltip"; import { Address } from "components/common/Address"; @@ -246,7 +247,9 @@ function StatusCard({ Block - {info.slot} + + + {blockhash && (