Clear bet input on submit
This commit is contained in:
parent
c6b860c0c8
commit
7e08a68799
|
@ -48,9 +48,10 @@ export function BetPanel(props: { contract: Contract; className?: string }) {
|
|||
|
||||
setIsSubmitting(false)
|
||||
setWasSubmitted(true)
|
||||
setBetAmount(undefined)
|
||||
}
|
||||
|
||||
const betDisabled = isSubmitting || wasSubmitted
|
||||
const betDisabled = isSubmitting || !betAmount
|
||||
|
||||
const initialProb = getProbability(contract.pot, betChoice)
|
||||
const resultProb = getProbability(contract.pot, betChoice, betAmount)
|
||||
|
@ -123,7 +124,7 @@ export function BetPanel(props: { contract: Contract; className?: string }) {
|
|||
? 'btn-disabled'
|
||||
: betChoice === 'YES'
|
||||
? 'btn-primary'
|
||||
: 'bg-red-400 hover:bg-red-500 focus:ring-red-400 border-none'
|
||||
: 'bg-red-400 hover:bg-red-500 border-none'
|
||||
)}
|
||||
onClick={betDisabled ? undefined : submitBet}
|
||||
>
|
||||
|
|
|
@ -51,7 +51,7 @@ export const ContractOverview = (props: {
|
|||
|
||||
<Spacer h={12} />
|
||||
|
||||
<div className="text-gray-600">{contract.description}</div>
|
||||
<div className="text-gray-600 whitespace-pre-line">{contract.description}</div>
|
||||
</Col>
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user