From 280308b625f3d5abefd10c859209bcdc8b71b918 Mon Sep 17 00:00:00 2001 From: James Grugett Date: Tue, 2 Aug 2022 17:40:34 -0700 Subject: [PATCH] Show # of bets equal to visible bets --- web/components/contract/contract-tabs.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/web/components/contract/contract-tabs.tsx b/web/components/contract/contract-tabs.tsx index fbf056e3..5aee7899 100644 --- a/web/components/contract/contract-tabs.tsx +++ b/web/components/contract/contract-tabs.tsx @@ -23,6 +23,9 @@ export function ContractTabs(props: { const { outcomeType } = contract const userBets = user && bets.filter((bet) => bet.userId === user.id) + const visibleBets = bets.filter( + (bet) => !bet.isAnte && !bet.isRedemption && bet.amount !== 0 + ) // Load comments here, so the badge count will be correct const updatedComments = useComments(contract.id) @@ -99,7 +102,7 @@ export function ContractTabs(props: { content: commentActivity, badge: `${comments.length}`, }, - { title: 'Bets', content: betActivity, badge: `${bets.length}` }, + { title: 'Bets', content: betActivity, badge: `${visibleBets.length}` }, ...(!user || !userBets?.length ? [] : [{ title: 'Your bets', content: yourTrades }]),