import { Fragment } from 'react' import { LinkIcon } from '@heroicons/react/outline' import { Menu, Transition } from '@headlessui/react' import { Contract } from '../../common/contract' import { copyToClipboard } from '../lib/util/copy' import { contractPath } from '../lib/firebase/contracts' import { ENV_CONFIG } from '../../common/envs/constants' function copyContractUrl(contract: Contract) { copyToClipboard(`https://${ENV_CONFIG.domain}${contractPath(contract)}`) } export function CopyLinkButton(props: { contract: Contract }) { const { contract } = props return ( copyContractUrl(contract)} >
Link copied!
) }