Added a couple of links to nav around more happily

This commit is contained in:
sam-keen 2022-03-03 17:01:51 +00:00 committed by Dexter Edwards
parent c797a11ceb
commit 346135c6d4
2 changed files with 8 additions and 2 deletions

View File

@ -35,7 +35,9 @@ export const TxDetails = ({ txData, pubKey }: TxDetailsProps) => {
{txData.height ? (
<tr>
<td>Block</td>
<td>{txData.height}</td>
<td>
<Link to={`/blocks/${txData.height}`}>{txData.height}</Link>
</td>
</tr>
) : null}
<tr>

View File

@ -1,6 +1,7 @@
import useFetch from '../../../hooks/use-fetch';
import { ChainExplorerTxResponse } from '../../../routes/types/chain-explorer-response';
import { DATA_SOURCES } from '../../../config';
import { Link } from 'react-router-dom';
interface TxsPerBlockProps {
blockHeight: string | undefined;
@ -16,6 +17,7 @@ export const TxsPerBlock = ({ blockHeight }: TxsPerBlockProps) => {
'Content-Type': 'application/json',
},
body: JSON.stringify({
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
block_height: parseInt(blockHeight!),
node_url: `${DATA_SOURCES.tendermintUrl}/`,
}),
@ -35,7 +37,9 @@ export const TxsPerBlock = ({ blockHeight }: TxsPerBlockProps) => {
decodedBlockData.map(({ TxHash, PubKey, Type }, index) => {
return (
<tr key={index}>
<td>{TxHash}</td>
<td>
<Link to={`/txs/${TxHash}`}>{TxHash}</Link>
</td>
<td>{PubKey}</td>
<td>{Type}</td>
</tr>