Show # of bets equal to visible bets

This commit is contained in:
James Grugett 2022-08-02 17:40:34 -07:00
parent b5d8acfef3
commit 280308b625

View File

@ -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 }]),