necessary changes to the types

This commit is contained in:
mquellhorst
2021-07-17 00:24:25 +02:00
committed by dan13ram
parent 6e0e0d3ba5
commit 7bac58f188

View File

@@ -38,22 +38,25 @@ const getImageMoloch = (title: string) => {
};
type LinkDaoProps = {
explorerUrl: string;
chain: string;
address: string;
explorerUrl: string | null;
};
const LinkDao: React.FC<LinkDaoProps> = ({ explorerUrl, children }) => {
if (explorerUrl) return <>{children}</>;
if (explorerUrl)
return (
<Link
role="group"
_hover={{ textDecoration: 'none' }}
href={explorerUrl}
isExternal
>
{children}
</Link>
);
return (
<Link
role="group"
_hover={{ textDecoration: 'none' }}
href={explorerUrl}
isExternal
>
{children}
</Link>
);
return <>{children}</>;
};
type DaoListingProps = {