diff --git a/web/components/bet-panel.tsx b/web/components/bet-panel.tsx index 351b012e..0cbee7b5 100644 --- a/web/components/bet-panel.tsx +++ b/web/components/bet-panel.tsx @@ -50,14 +50,10 @@ export function BetPanel(props: { const user = useUser() const userBets = useUserContractBets(user?.id, contract.id) const unfilledBets = useUnfilledBets(contract.id) ?? [] - const yourUnfilledBets = unfilledBets.filter((bet) => bet.userId === user?.id) const { sharesOutcome } = useSaveBinaryShares(contract, userBets) const [isLimitOrder, setIsLimitOrder] = useState(false) - const showLimitOrders = - (isLimitOrder && unfilledBets.length > 0) || yourUnfilledBets.length > 0 - return ( - {showLimitOrders && ( + {unfilledBets.length > 0 && ( )} @@ -105,9 +101,6 @@ export function SimpleBetPanel(props: { const [isLimitOrder, setIsLimitOrder] = useState(false) const unfilledBets = useUnfilledBets(contract.id) ?? [] - const yourUnfilledBets = unfilledBets.filter((bet) => bet.userId === user?.id) - const showLimitOrders = - (isLimitOrder && unfilledBets.length > 0) || yourUnfilledBets.length > 0 return ( @@ -138,7 +131,7 @@ export function SimpleBetPanel(props: { - {showLimitOrders && ( + {unfilledBets.length > 0 && ( )}