import React from "react"; import { NavLink } from "react-router-dom"; import { ethers } from "ethers"; type BlockLinkProps = { blockTag: ethers.providers.BlockTag; }; const BlockLink: React.FC = ({ blockTag }) => { const isNum = typeof blockTag === "number"; let text = blockTag; if (isNum) { text = ethers.utils.commify(blockTag); } return ( {text} ); }; export default React.memo(BlockLink);