diff --git a/web/components/contract-feed.tsx b/web/components/contract-feed.tsx index 061991f5..fbafcdc9 100644 --- a/web/components/contract-feed.tsx +++ b/web/components/contract-feed.tsx @@ -540,7 +540,7 @@ function groupBets( return items as ActivityItem[] } -function BetGroupSpan(props: { bets: Bet[]; outcome: 'YES' | 'NO' }) { +function BetGroupSpan(props: { bets: Bet[]; outcome: string }) { const { bets, outcome } = props const numberTraders = _.uniqBy(bets, (b) => b.userId).length @@ -566,7 +566,8 @@ function FeedBetGroup(props: { activityItem: any }) { const { activityItem } = props const bets: Bet[] = activityItem.bets - const [yesBets, noBets] = _.partition(bets, (bet) => bet.outcome === 'YES') + const betGroups = _.groupBy(bets, (bet) => bet.outcome) + const outcomes = Object.keys(betGroups) // Use the time of the last bet for the entire group const createdTime = bets[bets.length - 1].createdTime @@ -582,9 +583,12 @@ function FeedBetGroup(props: { activityItem: any }) {