From fe8f835ab267d645779b66ddded49a46e84b33ff Mon Sep 17 00:00:00 2001 From: ingawei Date: Wed, 20 Jul 2022 17:02:36 -0700 Subject: [PATCH] made changes to shareButton --- web/components/contract/contract-details.tsx | 9 +++++-- web/components/manalink-card.tsx | 3 ++- web/components/share-icon-button.tsx | 26 +++----------------- web/pages/group/[...slugs]/index.tsx | 6 +++-- 4 files changed, 16 insertions(+), 28 deletions(-) diff --git a/web/components/contract/contract-details.tsx b/web/components/contract/contract-details.tsx index b4d67520..036311fe 100644 --- a/web/components/contract/contract-details.tsx +++ b/web/components/contract/contract-details.tsx @@ -11,6 +11,7 @@ import { UserLink } from '../user-page' import { Contract, contractMetrics, + contractPath, contractPool, updateContract, } from 'web/lib/firebase/contracts' @@ -33,6 +34,7 @@ import { ShareIconButton } from 'web/components/share-icon-button' import { useUser } from 'web/hooks/use-user' import { Editor } from '@tiptap/react' import { exhibitExts } from 'common/util/parse' +import { ENV_CONFIG } from 'common/envs/constants' export type ShowTime = 'resolve-date' | 'close-date' @@ -222,9 +224,12 @@ export function ContractDetails(props: {
{volumeLabel}
{!disabled && } diff --git a/web/components/manalink-card.tsx b/web/components/manalink-card.tsx index 6e3f2cb9..b49e1621 100644 --- a/web/components/manalink-card.tsx +++ b/web/components/manalink-card.tsx @@ -9,6 +9,7 @@ import { ShareIconButton } from './share-icon-button' import { DotsHorizontalIcon } from '@heroicons/react/solid' import { contractDetailsButtonClassName } from './contract/contract-info-dialog' import { useUserById } from 'web/hooks/use-user' +import getManalinkUrl from 'web/get-manalink-url' export type ManalinkInfo = { expiresTime: number | null maxUses: number | null @@ -129,12 +130,12 @@ export function ManalinkCardFromView(props: { {formatMoney(amount)}