From 9c4191dc79ee78c356046df7e610c3be4c3dcc14 Mon Sep 17 00:00:00 2001 From: Ian Philips Date: Thu, 4 Aug 2022 10:55:37 -0600 Subject: [PATCH] Make copying easy on mobile --- web/pages/challenges/index.tsx | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/web/pages/challenges/index.tsx b/web/pages/challenges/index.tsx index 5c6a7640..21894637 100644 --- a/web/pages/challenges/index.tsx +++ b/web/pages/challenges/index.tsx @@ -23,6 +23,12 @@ import { UserLink } from 'web/components/user-page' import { Avatar } from 'web/components/avatar' import Router from 'next/router' import { contractPathWithoutContract } from 'web/lib/firebase/contracts' +import { CopyLinkButton } from 'web/components/copy-link-button' +import { ShareIconButton } from 'web/components/share-icon-button' +import { Button } from 'web/components/button' +import { ClipboardCopyIcon } from '@heroicons/react/outline' +import { copyToClipboard } from 'web/lib/util/copy' +import toast from 'react-hot-toast' dayjs.extend(customParseFormat) const columnClass = 'sm:px-5 px-2 py-3.5 max-w-[100px] truncate' @@ -103,11 +109,21 @@ function YourLinkSummaryRow(props: { challenge: Challenge }) { {formatMoney(challenge.creatorAmount)} - - - {getChallengeUrl(challenge) - .replace(`https://manifold.markets/challenges/`, '...') - .replace('http://localhost:3000/challenges', '...')} + + +