2021-10-31 06:16:03 +00:00
|
|
|
import React from "react";
|
|
|
|
import { NavLink } from "react-router-dom";
|
|
|
|
|
|
|
|
type PlainAddressProps = {
|
|
|
|
address: string;
|
|
|
|
linkable: boolean;
|
|
|
|
dontOverrideColors: boolean | undefined;
|
|
|
|
};
|
|
|
|
|
|
|
|
const PlainAddress: React.FC<PlainAddressProps> = ({
|
|
|
|
address,
|
|
|
|
linkable,
|
|
|
|
dontOverrideColors,
|
|
|
|
}) => {
|
|
|
|
if (linkable) {
|
|
|
|
return (
|
|
|
|
<NavLink
|
|
|
|
className={`${
|
|
|
|
dontOverrideColors ? "" : "text-link-blue hover:text-link-blue-hover"
|
|
|
|
} font-address truncate`}
|
|
|
|
to={`/address/${address}`}
|
2021-11-01 07:26:19 +00:00
|
|
|
title={address}
|
2021-10-31 06:16:03 +00:00
|
|
|
>
|
2021-11-01 07:26:19 +00:00
|
|
|
{address}
|
2021-10-31 06:16:03 +00:00
|
|
|
</NavLink>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
return (
|
|
|
|
<span className="font-address text-gray-400 truncate" title={address}>
|
|
|
|
{address}
|
|
|
|
</span>
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|
|
|
|
export default PlainAddress;
|