This commit is contained in:
		
						commit
						26ae76e640
					
				|  | @ -47,6 +47,7 @@ import { Modal } from './layout/modal' | ||||||
| import { Title } from './title' | import { Title } from './title' | ||||||
| import toast from 'react-hot-toast' | import toast from 'react-hot-toast' | ||||||
| import { CheckIcon } from '@heroicons/react/solid' | import { CheckIcon } from '@heroicons/react/solid' | ||||||
|  | import { Button } from './button' | ||||||
| 
 | 
 | ||||||
| export function BetPanel(props: { | export function BetPanel(props: { | ||||||
|   contract: CPMMBinaryContract | PseudoNumericContract |   contract: CPMMBinaryContract | PseudoNumericContract | ||||||
|  | @ -469,7 +470,6 @@ function LimitOrderPanel(props: { | ||||||
|   const [betAmount, setBetAmount] = useState<number | undefined>(undefined) |   const [betAmount, setBetAmount] = useState<number | undefined>(undefined) | ||||||
|   const [lowLimitProb, setLowLimitProb] = useState<number | undefined>() |   const [lowLimitProb, setLowLimitProb] = useState<number | undefined>() | ||||||
|   const [highLimitProb, setHighLimitProb] = useState<number | undefined>() |   const [highLimitProb, setHighLimitProb] = useState<number | undefined>() | ||||||
|   const betChoice = 'YES' |  | ||||||
|   const [error, setError] = useState<string | undefined>() |   const [error, setError] = useState<string | undefined>() | ||||||
|   const [isSubmitting, setIsSubmitting] = useState(false) |   const [isSubmitting, setIsSubmitting] = useState(false) | ||||||
| 
 | 
 | ||||||
|  | @ -783,22 +783,18 @@ function LimitOrderPanel(props: { | ||||||
|       {(hasYesLimitBet || hasNoLimitBet) && <Spacer h={8} />} |       {(hasYesLimitBet || hasNoLimitBet) && <Spacer h={8} />} | ||||||
| 
 | 
 | ||||||
|       {user && ( |       {user && ( | ||||||
|         <button |         <Button | ||||||
|           className={clsx( |           size="xl" | ||||||
|             'btn flex-1', |           disabled={betDisabled ? true : false} | ||||||
|             betDisabled |           color={'indigo'} | ||||||
|               ? 'btn-disabled' |           loading={isSubmitting} | ||||||
|               : betChoice === 'YES' |           className="flex-1" | ||||||
|               ? 'btn-primary' |  | ||||||
|               : 'border-none bg-red-400 hover:bg-red-500', |  | ||||||
|             isSubmitting ? 'loading' : '' |  | ||||||
|           )} |  | ||||||
|           onClick={betDisabled ? undefined : submitBet} |           onClick={betDisabled ? undefined : submitBet} | ||||||
|         > |         > | ||||||
|           {isSubmitting |           {isSubmitting | ||||||
|             ? 'Submitting...' |             ? 'Submitting...' | ||||||
|             : `Submit order${hasTwoBets ? 's' : ''}`} |             : `Submit order${hasTwoBets ? 's' : ''}`} | ||||||
|         </button> |         </Button> | ||||||
|       )} |       )} | ||||||
|     </Col> |     </Col> | ||||||
|   ) |   ) | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user