This commit is contained in:
ingawei 2022-09-20 22:51:58 -07:00
parent c0124a558f
commit aed48dfb22
2 changed files with 5 additions and 16 deletions

View File

@ -80,9 +80,8 @@ export default function BetButton(props: {
export function BinaryMobileBetting(props: {
contract: CPMMBinaryContract | Contract
className?: string
}) {
const { contract, className } = props
const { contract } = props
const user = useUser()
if (user) {
return (
@ -104,7 +103,7 @@ export function SignedInBinaryMobileBetting(props: {
user: User
}) {
const { contract, user } = props
const [betChoice, setBetChoice] = useState<'YES' | 'NO' | undefined>(
const [betChoice, _setBetChoice] = useState<'YES' | 'NO' | undefined>(
undefined
)
const unfilledBets = useUnfilledBets(contract.id) ?? []

View File

@ -1,6 +1,6 @@
import clsx from 'clsx'
import React, { useState } from 'react'
import { clamp, floor, partition, sumBy } from 'lodash'
import { clamp, partition, sumBy } from 'lodash'
import { useUser } from 'web/hooks/use-user'
import { CPMMBinaryContract, PseudoNumericContract } from 'common/contract'
@ -174,21 +174,11 @@ export function BuyPanel(props: {
user: User | null | undefined
unfilledBets: Bet[]
hidden: boolean
selected?: 'YES' | 'NO'
onBuySuccess?: () => void
onAdvanced?: () => void
mobileView?: boolean
}) {
const {
contract,
user,
unfilledBets,
hidden,
selected,
onBuySuccess,
onAdvanced,
mobileView,
} = props
const { contract, user, unfilledBets, hidden, onBuySuccess, mobileView } =
props
const initialProb = getProbability(contract)
const isPseudoNumeric = contract.outcomeType === 'PSEUDO_NUMERIC'