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>
|
</span>
|
||||||
<Input
|
<Input
|
||||||
className={clsx(
|
className={clsx(
|
||||||
'pl-9',
|
'w-24 pl-9 !text-base md:w-auto',
|
||||||
error && 'input-error',
|
error && 'input-error',
|
||||||
'w-24 md:w-auto',
|
|
||||||
inputClassName
|
inputClassName
|
||||||
)}
|
)}
|
||||||
ref={inputRef}
|
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(
|
const { newPool, newP, newBet } = getBinaryCpmmBetInfo(
|
||||||
outcome ?? 'YES',
|
outcome ?? 'YES',
|
||||||
|
@ -493,7 +493,7 @@ function LimitOrderPanel(props: {
|
||||||
!betAmount ||
|
!betAmount ||
|
||||||
rangeError ||
|
rangeError ||
|
||||||
outOfRangeError ||
|
outOfRangeError ||
|
||||||
error ||
|
!!error ||
|
||||||
(!hasYesLimitBet && !hasNoLimitBet)
|
(!hasYesLimitBet && !hasNoLimitBet)
|
||||||
|
|
||||||
const yesLimitProb =
|
const yesLimitProb =
|
||||||
|
@ -785,11 +785,11 @@ function LimitOrderPanel(props: {
|
||||||
{user && (
|
{user && (
|
||||||
<Button
|
<Button
|
||||||
size="xl"
|
size="xl"
|
||||||
disabled={betDisabled ? true : false}
|
disabled={betDisabled}
|
||||||
color={'indigo'}
|
color={'indigo'}
|
||||||
loading={isSubmitting}
|
loading={isSubmitting}
|
||||||
className="flex-1"
|
className="flex-1"
|
||||||
onClick={betDisabled ? undefined : submitBet}
|
onClick={submitBet}
|
||||||
>
|
>
|
||||||
{isSubmitting
|
{isSubmitting
|
||||||
? 'Submitting...'
|
? 'Submitting...'
|
||||||
|
|
Loading…
Reference in New Issue
Block a user