From db1543ea71bca4d9ded538efeb18c1f14d2b13c1 Mon Sep 17 00:00:00 2001 From: jahooma Date: Tue, 4 Jan 2022 09:55:34 -0600 Subject: [PATCH] Round bet amounts in feed --- web/components/contract-feed.tsx | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/web/components/contract-feed.tsx b/web/components/contract-feed.tsx index c663fa46..23995fa5 100644 --- a/web/components/contract-feed.tsx +++ b/web/components/contract-feed.tsx @@ -6,8 +6,6 @@ import { CheckIcon, LockClosedIcon, StarIcon, - ThumbDownIcon, - ThumbUpIcon, UserIcon, UsersIcon, XIcon, @@ -24,6 +22,7 @@ import { Linkify } from './linkify' import { Row } from './layout/row' import { createComment } from '../lib/firebase/comments' import { useComments } from '../hooks/use-comments' +import { formatMoney } from '../lib/util/format' dayjs.extend(relativeTime) function FeedComment(props: { activityItem: any }) { @@ -99,7 +98,7 @@ function FeedBet(props: { activityItem: any }) { {isCreator ? 'You' : 'A trader'} {' '} - placed M$ {amount} on {' '} + placed {formatMoney(amount)} on {' '} {isCreator && ( // Allow user to comment in an textarea if they are the creator @@ -372,7 +371,7 @@ function FeedBetGroup(props: { activityItem: any }) { .reduce((acc, bet) => acc + bet.amount, 0) const yesSpan = yesAmount ? ( - M$ {yesAmount} on + {formatMoney(yesAmount)} on ) : null const noAmount = bets @@ -380,7 +379,7 @@ function FeedBetGroup(props: { activityItem: any }) { .reduce((acc, bet) => acc + bet.amount, 0) const noSpan = noAmount ? ( - M$ {noAmount} on + {formatMoney(noAmount)} on ) : null const traderCount = bets.length