mirror of
https://github.com/hanzonet/explore.git
synced 2026-11-02 11:34:21 +00:00
* first version of the pack * single entry point * add custom components to the package * move form components to toolkit * add more utils and hooks to the package * minor fixes * add CI workflow * update readme and package.json * fix ts * fix build of env-validator * fix docker build * fix icons size * test fixes * more test fixes
33 lines
624 B
TypeScript
33 lines
624 B
TypeScript
import React from 'react';
|
|
|
|
import { Link } from 'toolkit/chakra/link';
|
|
import { makePrettyLink } from 'toolkit/utils/url';
|
|
import IconSvg from 'ui/shared/IconSvg';
|
|
|
|
interface Props {
|
|
url?: string | undefined;
|
|
}
|
|
|
|
const WebsiteLink = ({ url }: Props) => {
|
|
if (!url) {
|
|
return null;
|
|
}
|
|
|
|
return (
|
|
<Link
|
|
external
|
|
noIcon
|
|
href={ url }
|
|
display="inline-flex"
|
|
alignItems="center"
|
|
columnGap={ 1 }
|
|
mt={ 3 }
|
|
>
|
|
<IconSvg name="link" boxSize={ 5 } color="text.secondary"/>
|
|
<span>{ makePrettyLink(url)?.domain }</span>
|
|
</Link>
|
|
);
|
|
};
|
|
|
|
export default WebsiteLink;
|