Extract component
This commit is contained in:
parent
6a4cff5883
commit
ddfd0fb935
|
@ -91,20 +91,10 @@ const DecoratedAddressLink: React.FC<DecoratedAddressLinkProps> = ({
|
||||||
dontOverrideColors={mint || burn}
|
dontOverrideColors={mint || burn}
|
||||||
/>
|
/>
|
||||||
{eoa === true && (
|
{eoa === true && (
|
||||||
<span
|
<AddressLegend title="Externally owned account">(EOA)</AddressLegend>
|
||||||
className="text-xs text-gray-400 text-opacity-70 not-italic"
|
|
||||||
title="Externally owned account"
|
|
||||||
>
|
|
||||||
(EOA)
|
|
||||||
</span>
|
|
||||||
)}
|
)}
|
||||||
{eoa === false && (
|
{eoa === false && (
|
||||||
<span
|
<AddressLegend title="Contract account">(C)</AddressLegend>
|
||||||
className="text-xs text-gray-400 text-opacity-70 not-italic"
|
|
||||||
title="Contract account"
|
|
||||||
>
|
|
||||||
(C)
|
|
||||||
</span>
|
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
@ -156,4 +146,17 @@ const ResolvedAddress: React.FC<ResolvedAddressProps> = ({
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
type AddressLegendProps = {
|
||||||
|
title: string;
|
||||||
|
};
|
||||||
|
|
||||||
|
const AddressLegend: React.FC<AddressLegendProps> = ({ title, children }) => (
|
||||||
|
<span
|
||||||
|
className="text-xs text-gray-400 text-opacity-70 not-italic"
|
||||||
|
title={title}
|
||||||
|
>
|
||||||
|
{children}
|
||||||
|
</span>
|
||||||
|
);
|
||||||
|
|
||||||
export default React.memo(DecoratedAddressLink);
|
export default React.memo(DecoratedAddressLink);
|
||||||
|
|
Loading…
Reference in New Issue