Explorer: Linkify all displays of slot number (#13262)
This commit is contained in:
@ -1,3 +1,4 @@
|
|||||||
|
import { Slot } from "components/common/Slot";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import {
|
import {
|
||||||
SysvarAccount,
|
SysvarAccount,
|
||||||
@ -51,7 +52,7 @@ const renderAccountRow = (entry: SlotHashEntry, index: number) => {
|
|||||||
return (
|
return (
|
||||||
<tr key={index}>
|
<tr key={index}>
|
||||||
<td className="w-1 text-monospace">
|
<td className="w-1 text-monospace">
|
||||||
{entry.slot.toLocaleString("en-US")}
|
<Slot slot={entry.slot} link />
|
||||||
</td>
|
</td>
|
||||||
<td className="text-monospace">{entry.hash}</td>
|
<td className="text-monospace">{entry.hash}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -19,6 +19,7 @@ import {
|
|||||||
AccountBalanceRow,
|
AccountBalanceRow,
|
||||||
} from "components/common/Account";
|
} from "components/common/Account";
|
||||||
import { displayTimestamp } from "utils/date";
|
import { displayTimestamp } from "utils/date";
|
||||||
|
import { Slot } from "components/common/Slot";
|
||||||
|
|
||||||
export function SysvarAccountSection({
|
export function SysvarAccountSection({
|
||||||
account,
|
account,
|
||||||
@ -171,7 +172,7 @@ function SysvarAccountSlotHistory({
|
|||||||
<td className="text-lg-right text-monospace">
|
<td className="text-lg-right text-monospace">
|
||||||
{history.map((val) => (
|
{history.map((val) => (
|
||||||
<p key={val} className="mb-0">
|
<p key={val} className="mb-0">
|
||||||
{val}
|
<Slot slot={val} link />
|
||||||
</p>
|
</p>
|
||||||
))}
|
))}
|
||||||
</td>
|
</td>
|
||||||
@ -281,7 +282,7 @@ function SysvarAccountEpochScheduleCard({
|
|||||||
<tr>
|
<tr>
|
||||||
<td>First Normal Slot</td>
|
<td>First Normal Slot</td>
|
||||||
<td className="text-lg-right">
|
<td className="text-lg-right">
|
||||||
{sysvarAccount.info.firstNormalSlot}
|
<Slot slot={sysvarAccount.info.firstNormalSlot} />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</TableCardBody>
|
</TableCardBody>
|
||||||
@ -329,7 +330,9 @@ function SysvarAccountClockCard({
|
|||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>Slot</td>
|
<td>Slot</td>
|
||||||
<td className="text-lg-right">{sysvarAccount.info.slot}</td>
|
<td className="text-lg-right">
|
||||||
|
<Slot slot={sysvarAccount.info.slot} link />
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</TableCardBody>
|
</TableCardBody>
|
||||||
</div>
|
</div>
|
||||||
|
@ -276,7 +276,7 @@ const TokenTransactionRow = React.memo(
|
|||||||
return (
|
return (
|
||||||
<tr key={tx.signature}>
|
<tr key={tx.signature}>
|
||||||
<td className="w-1">
|
<td className="w-1">
|
||||||
<Slot slot={tx.slot} />
|
<Slot slot={tx.slot} link />
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td>
|
<td>
|
||||||
@ -327,7 +327,7 @@ const TokenTransactionRow = React.memo(
|
|||||||
return (
|
return (
|
||||||
<tr key={index}>
|
<tr key={index}>
|
||||||
<td className="w-1">
|
<td className="w-1">
|
||||||
<Slot slot={tx.slot} />
|
<Slot slot={tx.slot} link />
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td>
|
<td>
|
||||||
|
@ -72,7 +72,7 @@ export function TransactionHistoryCard({ pubkey }: { pubkey: PublicKey }) {
|
|||||||
detailsList.push(
|
detailsList.push(
|
||||||
<tr key={signature}>
|
<tr key={signature}>
|
||||||
<td className="w-1">
|
<td className="w-1">
|
||||||
<Slot slot={slot} />
|
<Slot slot={slot} link />
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td>
|
<td>
|
||||||
|
@ -9,6 +9,7 @@ import {
|
|||||||
AccountAddressRow,
|
AccountAddressRow,
|
||||||
AccountBalanceRow,
|
AccountBalanceRow,
|
||||||
} from "components/common/Account";
|
} from "components/common/Account";
|
||||||
|
import { Slot } from "components/common/Slot";
|
||||||
|
|
||||||
export function VoteAccountSection({
|
export function VoteAccountSection({
|
||||||
account,
|
account,
|
||||||
@ -18,6 +19,7 @@ export function VoteAccountSection({
|
|||||||
voteAccount: VoteAccount;
|
voteAccount: VoteAccount;
|
||||||
}) {
|
}) {
|
||||||
const refresh = useFetchAccountInfo();
|
const refresh = useFetchAccountInfo();
|
||||||
|
const rootSlot = voteAccount.info.rootSlot;
|
||||||
return (
|
return (
|
||||||
<div className="card">
|
<div className="card">
|
||||||
<AccountHeader
|
<AccountHeader
|
||||||
@ -75,7 +77,9 @@ export function VoteAccountSection({
|
|||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>Root Slot</td>
|
<td>Root Slot</td>
|
||||||
<td className="text-lg-right">{voteAccount.info.rootSlot}</td>
|
<td className="text-lg-right">
|
||||||
|
{rootSlot !== null ? <Slot slot={rootSlot} link /> : "N/A"}
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</TableCardBody>
|
</TableCardBody>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import { Slot } from "components/common/Slot";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { VoteAccount, Vote } from "validators/accounts/vote";
|
import { VoteAccount, Vote } from "validators/accounts/vote";
|
||||||
|
|
||||||
@ -44,7 +45,7 @@ const renderAccountRow = (vote: Vote, index: number) => {
|
|||||||
return (
|
return (
|
||||||
<tr key={index}>
|
<tr key={index}>
|
||||||
<td className="w-1 text-monospace">
|
<td className="w-1 text-monospace">
|
||||||
{vote.slot.toLocaleString("en-US")}
|
<Slot slot={vote.slot} link />
|
||||||
</td>
|
</td>
|
||||||
<td className="text-monospace">{vote.confirmationCount}</td>
|
<td className="text-monospace">{vote.confirmationCount}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -69,7 +69,7 @@ function StatsCardBody() {
|
|||||||
<tr>
|
<tr>
|
||||||
<td className="w-100">Slot</td>
|
<td className="w-100">Slot</td>
|
||||||
<td className="text-lg-right text-monospace">
|
<td className="text-lg-right text-monospace">
|
||||||
<Slot slot={absoluteSlot} />
|
<Slot slot={absoluteSlot} link />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{blockHeight !== undefined && (
|
{blockHeight !== undefined && (
|
||||||
|
Reference in New Issue
Block a user