From 77b4ca4f228a0110a1e2be6ebe30c5bb322836b0 Mon Sep 17 00:00:00 2001 From: James Grugett Date: Sat, 26 Feb 2022 10:56:49 -0600 Subject: [PATCH] FR: Don't show bet panel if resolving, or past close date. --- web/components/answers/answer-item.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/web/components/answers/answer-item.tsx b/web/components/answers/answer-item.tsx index a310a0a1..12817050 100644 --- a/web/components/answers/answer-item.tsx +++ b/web/components/answers/answer-item.tsx @@ -46,6 +46,8 @@ export function AnswerItem(props: { const [isBetting, setIsBetting] = useState(false) + const canBet = !isBetting && !showChoice && tradingAllowed(contract) + return (
!isBetting && setIsBetting(true)} + onClick={() => canBet && setIsBetting(true)} >