mirror of
https://github.com/luxfi/explore.git
synced 2026-09-24 00:28:18 +00:00
28 lines
584 B
TypeScript
28 lines
584 B
TypeScript
import React from 'react';
|
|
|
|
import { Link } from 'toolkit/next/link';
|
|
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 }
|
|
external
|
|
noIcon
|
|
className="inline-flex items-center gap-1"
|
|
>
|
|
<IconSvg name={ isEmail ? 'email' : 'link' } className="w-6 h-6 text-[var(--color-icon-primary)]"/>
|
|
<span>{ url }</span>
|
|
</Link>
|
|
);
|
|
};
|
|
|
|
export default SupportLink;
|