Tweak limit order UI and fix button
This commit is contained in:
parent
da1fcb646f
commit
c0c2934fe1
|
@ -47,9 +47,8 @@ export function AmountInput(props: {
|
|||
</span>
|
||||
<Input
|
||||
className={clsx(
|
||||
'pl-9',
|
||||
'w-24 pl-9 !text-base md:w-auto',
|
||||
error && 'input-error',
|
||||
'w-24 md:w-auto',
|
||||
inputClassName
|
||||
)}
|
||||
ref={inputRef}
|
||||
|
|
|
@ -271,7 +271,7 @@ export function BuyPanel(props: {
|
|||
})
|
||||
}
|
||||
|
||||
const betDisabled = isSubmitting || !betAmount || error
|
||||
const betDisabled = isSubmitting || !betAmount || !!error
|
||||
|
||||
const { newPool, newP, newBet } = getBinaryCpmmBetInfo(
|
||||
outcome ?? 'YES',
|
||||
|
@ -493,7 +493,7 @@ function LimitOrderPanel(props: {
|
|||
!betAmount ||
|
||||
rangeError ||
|
||||
outOfRangeError ||
|
||||
error ||
|
||||
!!error ||
|
||||
(!hasYesLimitBet && !hasNoLimitBet)
|
||||
|
||||
const yesLimitProb =
|
||||
|
@ -785,11 +785,11 @@ function LimitOrderPanel(props: {
|
|||
{user && (
|
||||
<Button
|
||||
size="xl"
|
||||
disabled={betDisabled ? true : false}
|
||||
disabled={betDisabled}
|
||||
color={'indigo'}
|
||||
loading={isSubmitting}
|
||||
className="flex-1"
|
||||
onClick={betDisabled ? undefined : submitBet}
|
||||
onClick={submitBet}
|
||||
>
|
||||
{isSubmitting
|
||||
? 'Submitting...'
|
||||
|
|
Loading…
Reference in New Issue
Block a user