diff --git a/web/components/feed/activity-items.ts b/web/components/feed/activity-items.ts index bc91933e..9d5e9a01 100644 --- a/web/components/feed/activity-items.ts +++ b/web/components/feed/activity-items.ts @@ -277,10 +277,8 @@ export function getRecentContractActivityItems( let items: ActivityItem[] = [] if (contract.outcomeType === 'FREE_RESPONSE') { - // Keep last two comments. - comments = comments.slice(-2) - const lastBet = bets[bets.length - 1] - + // Keep last three comments. + comments = comments.slice(-3) const outcomeToComments = _.groupBy(comments, (c) => { const bet = bets.find((bet) => bet.id === c.betId) return bet?.outcome @@ -288,6 +286,7 @@ export function getRecentContractActivityItems( delete outcomeToComments['undefined'] // Include up to 2 outcomes from comments and last bet. + const lastBet = bets[bets.length - 1] const outcomes = filterDefined( _.uniq([...Object.keys(outcomeToComments), lastBet?.outcome]) ).slice(-2) diff --git a/web/components/feed/feed-items.tsx b/web/components/feed/feed-items.tsx index 8f1892e5..2c86779a 100644 --- a/web/components/feed/feed-items.tsx +++ b/web/components/feed/feed-items.tsx @@ -8,7 +8,6 @@ import { LockClosedIcon, UserIcon, UsersIcon, - PencilAltIcon, XIcon, } from '@heroicons/react/solid' import dayjs from 'dayjs' @@ -195,9 +194,12 @@ function FeedBet(props: { <>
{isSelf ? ( - + ) : isCreator ? ( - + ) : (
@@ -661,25 +663,22 @@ function FeedAnswerGroup(props: { items: ActivityItem[] }) { const { answer, items } = props + const { username, avatarUrl, userId, name, text } = answer return ( - - -
-
-
-
+ + +
+
+
-
-
- + +
+ answered
-
+ + {items.map((item, index) => (