Skip to content

Commit

Permalink
singular new trader
Browse files Browse the repository at this point in the history
  • Loading branch information
sipec committed Apr 3, 2024
1 parent 8bad5b8 commit 155af62
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions web/components/notifications/income-summary-notifications.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ import {
Notification,
UniqueBettorData,
} from 'common/notification'
import { formatMoney, formatMoneyToDecimal } from 'common/util/format'
import {
formatMoney,
formatMoneyToDecimal,
maybePluralize,
} from 'common/util/format'
import { groupBy } from 'lodash'
import { useState } from 'react'
import clsx from 'clsx'
Expand Down Expand Up @@ -144,11 +148,16 @@ export function UniqueBettorBonusIncomeNotification(props: {
<IncomeNotificationLabel notification={notification} /> Bonus for{' '}
<PrimaryNotificationLink
text={
(sourceText ? `${numNewTraders} new traders` : 'new traders') +
(answerText && outcomeType !== 'NUMBER' ? ` (${answerText})` : '')
sourceText
? `${numNewTraders} ${maybePluralize(
'new trader',
numNewTraders
)}`
: 'new traders'
}
/>{' '}
<QuestionOrGroupLink notification={notification} />
on <QuestionOrGroupLink notification={notification} />{' '}
{answerText && outcomeType !== 'NUMBER' ? ` (${answerText})` : ''}
</span>
{isPartner && totalUniqueBettors && (
<div>
Expand Down

0 comments on commit 155af62

Please sign in to comment.