import React from 'react'; import { Typography } from 'antd'; import { shortenAddress } from '../../utils/utils'; export const EtherscanLink = (props: { address: string ; type: string; code?: boolean; style?: React.CSSProperties; length?: number; }) => { const { type, code } = props; const address = props.address; if (!address) { return null; } const length = props.length ?? 9; return ( {code ? ( {shortenAddress(address, length)} ) : ( shortenAddress(address, length) )} ); };