track limit orders

This commit is contained in:
mantikoros 2022-07-12 16:55:00 -05:00
parent 24896e44b4
commit dd9fdc381f

View File

@ -54,6 +54,10 @@ export function BetPanel(props: {
const { sharesOutcome } = useSaveBinaryShares(contract, userBets) const { sharesOutcome } = useSaveBinaryShares(contract, userBets)
const [isLimitOrder, setIsLimitOrder] = useState(false) const [isLimitOrder, setIsLimitOrder] = useState(false)
const toggleLimitOrder = () => {
setIsLimitOrder(!isLimitOrder)
track('toggle limit order')
}
return ( return (
<Col className={className}> <Col className={className}>
@ -75,7 +79,7 @@ export function BetPanel(props: {
</div> </div>
<button <button
className="btn btn-ghost btn-sm text-sm normal-case" className="btn btn-ghost btn-sm text-sm normal-case"
onClick={() => setIsLimitOrder(!isLimitOrder)} onClick={toggleLimitOrder}
> >
<SwitchHorizontalIcon className="inline h-6 w-6" /> <SwitchHorizontalIcon className="inline h-6 w-6" />
</button> </button>
@ -242,6 +246,8 @@ function BuyPanel(props: {
contractId: contract.id, contractId: contract.id,
amount: betAmount, amount: betAmount,
outcome: betChoice, outcome: betChoice,
isLimitOrder,
limitProb: limitProbScaled,
}) })
} }