Filter redemption bets out of market 'Bets' tab
This commit is contained in:
parent
90a8de09d7
commit
23944bf47a
|
@ -479,9 +479,7 @@ export function getRecentContractActivityItems(
|
||||||
}
|
}
|
||||||
) {
|
) {
|
||||||
const { contractPath } = options
|
const { contractPath } = options
|
||||||
bets = bets
|
bets = bets.sort((b1, b2) => b1.createdTime - b2.createdTime)
|
||||||
.filter((bet) => !bet.isRedemption)
|
|
||||||
.sort((b1, b2) => b1.createdTime - b2.createdTime)
|
|
||||||
comments = comments.sort((c1, c2) => c1.createdTime - c2.createdTime)
|
comments = comments.sort((c1, c2) => c1.createdTime - c2.createdTime)
|
||||||
|
|
||||||
const questionItem: QuestionItem = {
|
const questionItem: QuestionItem = {
|
||||||
|
|
|
@ -39,7 +39,7 @@ export function ContractActivity(props: {
|
||||||
|
|
||||||
// eslint-disable-next-line react-hooks/rules-of-hooks
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
||||||
const updatedBets = mode === 'only-recent' ? undefined : useBets(contract.id)
|
const updatedBets = mode === 'only-recent' ? undefined : useBets(contract.id)
|
||||||
const bets = updatedBets ?? props.bets
|
const bets = (updatedBets ?? props.bets).filter((bet) => !bet.isRedemption)
|
||||||
|
|
||||||
const items =
|
const items =
|
||||||
mode === 'only-recent'
|
mode === 'only-recent'
|
||||||
|
|
Loading…
Reference in New Issue
Block a user