Tweak limit order UI and fix button

This commit is contained in:
Sinclair Chen 2022-10-11 17:19:55 -07:00
parent da1fcb646f
commit c0c2934fe1
2 changed files with 5 additions and 6 deletions

View File

@ -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}

View File

@ -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...'