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
|
l.amount > 0
|
||||||
)
|
)
|
||||||
|
|
||||||
// Load comments here, so the badge count will be correct
|
const comments = useComments(contract.id) ?? props.comments
|
||||||
const updatedComments = useComments(contract.id)
|
|
||||||
const comments = updatedComments ?? props.comments
|
|
||||||
|
|
||||||
const betActivity = lps != null && (
|
const betActivity = lps != null && (
|
||||||
<ContractBetsActivity
|
<ContractBetsActivity
|
||||||
|
@ -107,18 +105,10 @@ export function ContractTabs(props: {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Tabs
|
<Tabs
|
||||||
currentPageForAnalytics="contract"
|
currentPageForAnalytics={'contract'}
|
||||||
tabs={[
|
tabs={[
|
||||||
{
|
{ title: 'Comments', content: commentActivity },
|
||||||
title: 'Comments',
|
{ title: capitalize(PAST_BETS), content: betActivity },
|
||||||
content: commentActivity,
|
|
||||||
badge: `${comments.length}`,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: capitalize(PAST_BETS),
|
|
||||||
content: betActivity,
|
|
||||||
badge: `${visibleBets.length + visibleLps.length}`,
|
|
||||||
},
|
|
||||||
...(!user || !userBets?.length
|
...(!user || !userBets?.length
|
||||||
? []
|
? []
|
||||||
: [
|
: [
|
||||||
|
|
Loading…
Reference in New Issue
Block a user