Capitalize

This commit is contained in:
Ian Philips 2022-09-15 09:57:14 -06:00
parent be91d5d5e0
commit b3e6dce31e
3 changed files with 5 additions and 7 deletions

View File

@ -16,10 +16,6 @@ export function formatMoneyWithDecimals(amount: number) {
return ENV_CONFIG.moneyMoniker + amount.toFixed(2)
}
export function capitalFirst(s: string) {
return s.charAt(0).toUpperCase() + s.slice(1)
}
export function formatWithCommas(amount: number) {
return formatter.format(Math.floor(amount)).replace('$', '')
}

View File

@ -18,6 +18,7 @@ import { useLiquidity } from 'web/hooks/use-liquidity'
import { BetSignUpPrompt } from '../sign-up-prompt'
import { PlayMoneyDisclaimer } from '../play-money-disclaimer'
import BetButton from '../bet-button'
import { capitalize } from 'lodash'
export function ContractTabs(props: {
contract: Contract
@ -114,7 +115,7 @@ export function ContractTabs(props: {
badge: `${comments.length}`,
},
{
title: PAST_BETS,
title: capitalize(PAST_BETS),
content: betActivity,
badge: `${visibleBets.length}`,
},

View File

@ -25,7 +25,7 @@ import { UserFollowButton } from './follow-button'
import { GroupsButton } from 'web/components/groups/groups-button'
import { PortfolioValueSection } from './portfolio/portfolio-value-section'
import { ReferralsButton } from 'web/components/referrals-button'
import { capitalFirst, formatMoney } from 'common/util/format'
import { formatMoney } from 'common/util/format'
import { ShareIconButton } from 'web/components/share-icon-button'
import { ENV_CONFIG } from 'common/envs/constants'
import {
@ -36,6 +36,7 @@ import { REFERRAL_AMOUNT } from 'common/economy'
import { LoansModal } from './profile/loans-modal'
import { UserLikesButton } from 'web/components/profile/user-likes-button'
import { PAST_BETS } from 'common/user'
import { capitalize } from 'lodash'
export function UserPage(props: { user: User }) {
const { user } = props
@ -270,7 +271,7 @@ export function UserPage(props: { user: User }) {
),
},
{
title: capitalFirst(PAST_BETS),
title: capitalize(PAST_BETS),
content: (
<>
<BetsList user={user} />