From aed48dfb2258ab4793dae841dcc9c1b9ed2ab250 Mon Sep 17 00:00:00 2001 From: ingawei Date: Tue, 20 Sep 2022 22:51:58 -0700 Subject: [PATCH] linting --- web/components/bet-button.tsx | 5 ++--- web/components/bet-panel.tsx | 16 +++------------- 2 files changed, 5 insertions(+), 16 deletions(-) diff --git a/web/components/bet-button.tsx b/web/components/bet-button.tsx index daa53bf7..92599b61 100644 --- a/web/components/bet-button.tsx +++ b/web/components/bet-button.tsx @@ -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) ?? [] diff --git a/web/components/bet-panel.tsx b/web/components/bet-panel.tsx index e7b33c4f..40e8c2e7 100644 --- a/web/components/bet-panel.tsx +++ b/web/components/bet-panel.tsx @@ -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'