import React from "react"; import { NavLink } from "react-router-dom"; import { BlockTag } from "@ethersproject/abstract-provider"; import { commify } from "@ethersproject/units"; import { blockURL } from "../url"; type BlockLinkProps = { blockTag: BlockTag; }; const BlockLink: React.FC = ({ blockTag }) => { const isNum = typeof blockTag === "number"; let text = blockTag; if (isNum) { text = commify(blockTag); } return ( {text} ); }; export default React.memo(BlockLink);