FR: Don't show bet panel if resolving, or past close date.

This commit is contained in:
James Grugett 2022-02-26 10:56:49 -06:00
parent 2775bf44a2
commit 77b4ca4f22

View File

@ -46,6 +46,8 @@ export function AnswerItem(props: {
const [isBetting, setIsBetting] = useState(false)
const canBet = !isBetting && !showChoice && tradingAllowed(contract)
return (
<div
className={clsx(
@ -59,9 +61,9 @@ export function AnswerItem(props: {
: showChoice === 'radio'
? 'bg-green-50'
: 'bg-blue-50',
isBetting ? '' : 'cursor-pointer hover:bg-gray-100'
canBet && 'cursor-pointer hover:bg-gray-100'
)}
onClick={() => !isBetting && setIsBetting(true)}
onClick={() => canBet && setIsBetting(true)}
>
<Col className="flex-1 gap-3">
<div className="whitespace-pre-line">