Commit 11e38938 authored by tom goriunov's avatar tom goriunov Committed by GitHub

Merge pull request #649 from blockscout/fix-parent-block-link

fix parent block link
parents 1bac4156 8ceb974b
......@@ -306,7 +306,7 @@ const BlockDetails = () => {
hint="The hash of the block from which this block was generated"
flexWrap="nowrap"
>
<AddressLink hash={ data.parent_hash } type="block" id={ String(data.height - 1) }/>
<AddressLink hash={ data.parent_hash } type="block" blockHeight={ String(data.height - 1) }/>
<CopyToClipboard text={ data.parent_hash }/>
</DetailsInfoItem>
) }
......
......@@ -27,7 +27,7 @@ type AddressTokenTxProps = {
type BlockProps = {
type: 'block';
hash: string;
height: string;
blockHeight: string;
}
type AddressTokenProps = {
......@@ -48,7 +48,7 @@ const AddressLink = (props: Props) => {
} else if (type === 'token') {
url = route({ pathname: '/token/[hash]', query: { hash } });
} else if (type === 'block') {
url = route({ pathname: '/block/[height]', query: { height: props.height } });
url = route({ pathname: '/block/[height]', query: { height: props.blockHeight } });
} else if (type === 'address_token') {
url = route({ pathname: '/address/[hash]', query: { hash, tab: 'token_transfers', token_hash: props.tokenHash, scroll_to_tabs: 'true' } });
} else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment