From e1b6619e9c0a593db8ec0f06d6027b172fb4c9cc Mon Sep 17 00:00:00 2001 From: mantikoros Date: Wed, 13 Jul 2022 17:22:22 -0500 Subject: [PATCH] embeds: don't show bet button after resolution --- web/pages/embed/[username]/[contractSlug].tsx | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/web/pages/embed/[username]/[contractSlug].tsx b/web/pages/embed/[username]/[contractSlug].tsx index dc8cb51d..57189c0c 100644 --- a/web/pages/embed/[username]/[contractSlug].tsx +++ b/web/pages/embed/[username]/[contractSlug].tsx @@ -22,6 +22,7 @@ import { fromPropz, usePropz } from 'web/hooks/use-propz' import { useWindowSize } from 'web/hooks/use-window-size' import { listAllBets } from 'web/lib/firebase/bets' import { contractPath, getContractFromSlug } from 'web/lib/firebase/contracts' +import { tradingAllowed } from 'web/lib/firebase/contracts' import Custom404 from '../../404' export const getStaticProps = fromPropz(getStaticPropz) @@ -112,17 +113,21 @@ function ContractEmbed(props: { contract: Contract; bets: Bet[] }) { {isBinary && ( - + {tradingAllowed(contract) && ( + + )} )} {isPseudoNumeric && ( - + {tradingAllowed(contract) && ( + + )} )}