import React from "react"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { faCoins } from "@fortawesome/free-solid-svg-icons"; import Address from "./Address"; import AddressLink from "./AddressLink"; import ENSName from "./ENSName"; import ENSNameLink from "./ENSNameLink"; type AddressOrENSNameProps = { address: string; ensName?: string; selectedAddress?: string; minerAddress?: string; }; const AddressOrENSName: React.FC = ({ address, ensName, selectedAddress, minerAddress, }) => (
{minerAddress !== undefined && minerAddress === address && ( )} {address === selectedAddress ? ( <> {ensName ? ( ) : (
)} ) : ( <> {ensName ? ( ) : ( )} )}
); export default React.memo(AddressOrENSName);