From b8a9bc65c7a9fa568af01486050ee7da4ba28b0e Mon Sep 17 00:00:00 2001 From: Marshall Polaris Date: Sun, 15 May 2022 14:47:30 -0700 Subject: [PATCH] Ditch now-unnecessary SellAmountInput --- web/components/amount-input.tsx | 39 --------------------------------- web/components/bet-panel.tsx | 8 +++---- 2 files changed, 4 insertions(+), 43 deletions(-) diff --git a/web/components/amount-input.tsx b/web/components/amount-input.tsx index 78605b55..439facaf 100644 --- a/web/components/amount-input.tsx +++ b/web/components/amount-input.tsx @@ -17,7 +17,6 @@ export function AmountInput(props: { inputClassName?: string // Needed to focus the amount input inputRef?: React.MutableRefObject - children?: any }) { const { amount, @@ -28,7 +27,6 @@ export function AmountInput(props: { className, inputClassName, inputRef, - children, } = props const onAmountChange = (str: string) => { @@ -75,8 +73,6 @@ export function AmountInput(props: { )} )} - - {children} ) } @@ -135,38 +131,3 @@ export function BuyAmountInput(props: { /> ) } - -export function SellAmountInput(props: { - contract: FullContract - amount: number | undefined - onChange: (newAmount: number | undefined) => void - error: string | undefined - disabled?: boolean - className?: string - inputClassName?: string - // Needed to focus the amount input - inputRef?: React.MutableRefObject -}) { - const { - amount, - onChange, - error, - disabled, - className, - inputClassName, - inputRef, - } = props - - return ( - - ) -} diff --git a/web/components/bet-panel.tsx b/web/components/bet-panel.tsx index 978821f5..7f702bfc 100644 --- a/web/components/bet-panel.tsx +++ b/web/components/bet-panel.tsx @@ -17,7 +17,7 @@ import { Title } from './title' import { firebaseLogin, User } from 'web/lib/firebase/users' import { Bet } from 'common/bet' import { placeBet, sellShares } from 'web/lib/firebase/api-call' -import { BuyAmountInput, SellAmountInput } from './amount-input' +import { AmountInput, BuyAmountInput } from './amount-input' import { InfoTooltip } from './info-tooltip' import { BinaryOutcomeLabel } from './outcome-label' import { @@ -474,9 +474,7 @@ export function SellPanel(props: { return ( <> -