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

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