From bec8cdb3e808fa55468aa9d25c6e64e076791f67 Mon Sep 17 00:00:00 2001 From: James Grugett Date: Mon, 2 May 2022 11:23:51 -0400 Subject: [PATCH] Add share market widget shown if you are the creator --- web/components/contract/contract-overview.tsx | 5 +++- web/components/copy-link-button.tsx | 18 +++++++------ web/components/share-market.tsx | 26 +++++++++++++++++++ web/lib/firebase/contracts.ts | 5 ++++ 4 files changed, 45 insertions(+), 9 deletions(-) create mode 100644 web/components/share-market.tsx diff --git a/web/components/contract/contract-overview.tsx b/web/components/contract/contract-overview.tsx index 88dc053f..524a1962 100644 --- a/web/components/contract/contract-overview.tsx +++ b/web/components/contract/contract-overview.tsx @@ -17,6 +17,7 @@ import { AnswersGraph } from '../answers/answers-graph' import { DPM, FreeResponse, FullContract } from '../../../common/contract' import { ContractDescription } from './contract-description' import { ContractDetails } from './contract-details' +import { ShareMarket } from '../share-market' export const ContractOverview = (props: { contract: Contract @@ -84,7 +85,9 @@ export const ContractOverview = (props: { /> )} - {contract.description && } + {(contract.description || isCreator) && } + + {isCreator && } copyContractUrl(contract)} >