Skip to content

Commit

Permalink
Block height link fix (#4735)
Browse files Browse the repository at this point in the history
Blockheight link fix
  • Loading branch information
vrrayz authored Jan 16, 2024
1 parent e886e1e commit 0fcd61c
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions packages/ui/src/common/components/BlockTime/BlockInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,12 @@ export interface BlockInfoProp {

export const BlockInfo = ({ block, lessInfo, inline }: BlockInfoProp) => {
const [endpoints] = useNetworkEndpoints()
const blockLink =
endpoints.nodeRpcEndpoint == process.env.REACT_APP_MAINNET_NODE_SOCKET
? 'joystream.subscan.io/block'
: `polkadot.js.org/apps/?rpc=${endpoints.nodeRpcEndpoint}/ws-rpc#/explorer/query`
return (
<BlockLink
onClick={(evt) => evt.stopPropagation()}
href={`https://polkadot.js.org/apps/?rpc=${endpoints.nodeRpcEndpoint}/ws-rpc#/explorer/query/${block.number}`}
>
<BlockLink onClick={(evt) => evt.stopPropagation()} href={`https://${blockLink}/${block.number}`}>
<BlockInfoContainer lessInfo={lessInfo} inline={inline}>
<BlockIcon />
<span>
Expand Down

2 comments on commit 0fcd61c

@vercel
Copy link

@vercel vercel bot commented on 0fcd61c Jan 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on 0fcd61c Jan 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

pioneer-2 – ./

pioneer-2-git-dev-joystream.vercel.app
pioneer-2.vercel.app
pioneer-2-joystream.vercel.app

Please sign in to comment.