diff --git a/web/components/contract/share-modal.tsx b/web/components/contract/share-modal.tsx
index c462e78b..e1805364 100644
--- a/web/components/contract/share-modal.tsx
+++ b/web/components/contract/share-modal.tsx
@@ -51,17 +51,10 @@ export function ShareModal(props: {
color="gradient"
className={'mb-2 flex max-w-xs self-center'}
onClick={() => {
- if (window.navigator.share) {
- window.navigator.share({
- url: shareUrl,
- title: contract.question,
- })
- } else {
- copyToClipboard(shareUrl)
- toast.success('Link copied!', {
- icon: linkIcon,
- })
- }
+ copyToClipboard(shareUrl)
+ toast.success('Link copied!', {
+ icon: linkIcon,
+ })
track('copy share link')
}}
>
@@ -73,7 +66,7 @@ export function ShareModal(props: {
className="self-start"
tweetText={getTweetText(contract, shareUrl)}
/>
-
+
diff --git a/web/components/share-embed-button.tsx b/web/components/share-embed-button.tsx
index 8678299b..cfbe78f0 100644
--- a/web/components/share-embed-button.tsx
+++ b/web/components/share-embed-button.tsx
@@ -1,12 +1,12 @@
-import React, { Fragment } from 'react'
+import React from 'react'
import { CodeIcon } from '@heroicons/react/outline'
-import { Menu, Transition } from '@headlessui/react'
+import { Menu } from '@headlessui/react'
+import toast from 'react-hot-toast'
import { Contract } from 'common/contract'
import { contractPath } from 'web/lib/firebase/contracts'
import { DOMAIN } from 'common/envs/constants'
import { copyToClipboard } from 'web/lib/util/copy'
-import { ToastClipboard } from 'web/components/toast-clipboard'
import { track } from 'web/lib/service/analytics'
export function embedCode(contract: Contract) {
@@ -16,11 +16,10 @@ export function embedCode(contract: Contract) {
return ``
}
-export function ShareEmbedButton(props: {
- contract: Contract
- toastClassName?: string
-}) {
- const { contract, toastClassName } = props
+export function ShareEmbedButton(props: { contract: Contract }) {
+ const { contract } = props
+
+ const codeIcon =
return (
)
}