feat: add link on block/extrinsic number to block detail
This commit is contained in:
@@ -8,6 +8,7 @@ import { twMerge } from "tailwind-merge"
|
||||
import { BlockInfo, blocksByHeight$, finalized$ } from "./block.state"
|
||||
import { BlockPopover } from "./BlockPopover"
|
||||
import * as Finalizing from "./FinalizingTable"
|
||||
import { Link } from "react-router-dom"
|
||||
|
||||
const best$ = chainHead$.pipeState(switchMap((chainHead) => chainHead.best$))
|
||||
|
||||
@@ -124,7 +125,9 @@ export const BlockTable = () => {
|
||||
"border-b-card-foreground/50",
|
||||
)}
|
||||
>
|
||||
{row.block.number.toLocaleString()}
|
||||
<Link to={`/explorer/${row.block.hash}`}>
|
||||
{row.block.number.toLocaleString()}
|
||||
</Link>
|
||||
</td>
|
||||
) : null}
|
||||
<td className="p-0">
|
||||
|
||||
@@ -5,6 +5,7 @@ import { finalized$ } from "./block.state"
|
||||
import { EventPopover } from "./EventPopover"
|
||||
import { eventKey, recentEvents$ } from "./events.state"
|
||||
import * as Finalizing from "./FinalizingTable"
|
||||
import { Link } from "react-router-dom"
|
||||
|
||||
export const Events = () => {
|
||||
const events = useStateObservable(recentEvents$)
|
||||
@@ -41,7 +42,9 @@ export const Events = () => {
|
||||
firstInGroup
|
||||
>
|
||||
<td className="p-2 whitespace-nowrap">
|
||||
{evt.number.toLocaleString()}
|
||||
<Link to={`/explorer/${evt.hash}`}>
|
||||
{evt.number.toLocaleString()}
|
||||
</Link>
|
||||
</td>
|
||||
<td
|
||||
className="p-1 w-full"
|
||||
@@ -78,7 +81,9 @@ export const Events = () => {
|
||||
)}
|
||||
rowSpan={span}
|
||||
>
|
||||
{key}
|
||||
<Link to={`/explorer/${evt.hash}#tx=${evt.index}`}>
|
||||
{key}
|
||||
</Link>
|
||||
</td>
|
||||
)}
|
||||
<td
|
||||
|
||||
Reference in New Issue
Block a user