From 67b345092400005784180c5f43dd5a82c51621a2 Mon Sep 17 00:00:00 2001 From: James Grugett Date: Wed, 13 Jul 2022 18:28:33 -0500 Subject: [PATCH] Use quick vs limit bet in mobile dialog --- web/components/bet-panel.tsx | 79 +++++++++++++++++++----------------- 1 file changed, 41 insertions(+), 38 deletions(-) diff --git a/web/components/bet-panel.tsx b/web/components/bet-panel.tsx index bd2bfebb..26d2d974 100644 --- a/web/components/bet-panel.tsx +++ b/web/components/bet-panel.tsx @@ -1,7 +1,6 @@ import clsx from 'clsx' import React, { useEffect, useState } from 'react' import { partition, sum, sumBy } from 'lodash' -import { SwitchHorizontalIcon } from '@heroicons/react/solid' import { useUser } from 'web/hooks/use-user' import { CPMMBinaryContract, PseudoNumericContract } from 'common/contract' @@ -72,30 +71,10 @@ export function BetPanel(props: { className )} > - -
Bet
- - { - setIsLimitOrder(false) - track('select quick order') - }} - > - Quick - - { - setIsLimitOrder(true) - track('select limit order') - }} - > - Limit - - -
- + - -
- {isLimitOrder ? <>Limit order : <>Place your bet} -
- - -
- + void +}) { + const { isLimitOrder, setIsLimitOrder } = props + + return ( + +
Bet
+ + { + setIsLimitOrder(false) + track('select quick order') + }} + > + Quick + + { + setIsLimitOrder(true) + track('select limit order') + }} + > + Limit + + +
+ ) +} + export function SellPanel(props: { contract: CPMMBinaryContract | PseudoNumericContract userBets: Bet[]