Kill counts of comments and trades on contract page (#900)
This commit is contained in:
parent
589bf9651d
commit
be4def49a2
|
@ -47,9 +47,7 @@ export function ContractTabs(props: {
|
|||
l.amount > 0
|
||||
)
|
||||
|
||||
// Load comments here, so the badge count will be correct
|
||||
const updatedComments = useComments(contract.id)
|
||||
const comments = updatedComments ?? props.comments
|
||||
const comments = useComments(contract.id) ?? props.comments
|
||||
|
||||
const betActivity = lps != null && (
|
||||
<ContractBetsActivity
|
||||
|
@ -107,18 +105,10 @@ export function ContractTabs(props: {
|
|||
|
||||
return (
|
||||
<Tabs
|
||||
currentPageForAnalytics="contract"
|
||||
currentPageForAnalytics={'contract'}
|
||||
tabs={[
|
||||
{
|
||||
title: 'Comments',
|
||||
content: commentActivity,
|
||||
badge: `${comments.length}`,
|
||||
},
|
||||
{
|
||||
title: capitalize(PAST_BETS),
|
||||
content: betActivity,
|
||||
badge: `${visibleBets.length + visibleLps.length}`,
|
||||
},
|
||||
{ title: 'Comments', content: commentActivity },
|
||||
{ title: capitalize(PAST_BETS), content: betActivity },
|
||||
...(!user || !userBets?.length
|
||||
? []
|
||||
: [
|
||||
|
|
Loading…
Reference in New Issue
Block a user