mirror of
https://github.com/luxfi/explore.git
synced 2026-09-24 00:28:18 +00:00
29 lines
588 B
TypeScript
29 lines
588 B
TypeScript
import { Link } from '@chakra-ui/react';
|
|
import React from 'react';
|
|
|
|
import IconSvg from 'ui/shared/IconSvg';
|
|
|
|
interface Props {
|
|
url: string;
|
|
}
|
|
|
|
const SupportLink = ({ url }: Props) => {
|
|
const isEmail = url.includes('@');
|
|
const href = isEmail ? `mailto:${ url }` : url;
|
|
|
|
return (
|
|
<Link
|
|
href={ href }
|
|
target="_blank"
|
|
display="inline-flex"
|
|
alignItems="center"
|
|
columnGap={ 1 }
|
|
>
|
|
<IconSvg name={ isEmail ? 'email' : 'link' } boxSize={ 6 } color="text_secondary"/>
|
|
<span>{ url }</span>
|
|
</Link>
|
|
);
|
|
};
|
|
|
|
export default SupportLink;
|