Capitalize
This commit is contained in:
parent
be91d5d5e0
commit
b3e6dce31e
|
@ -16,10 +16,6 @@ export function formatMoneyWithDecimals(amount: number) {
|
||||||
return ENV_CONFIG.moneyMoniker + amount.toFixed(2)
|
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) {
|
export function formatWithCommas(amount: number) {
|
||||||
return formatter.format(Math.floor(amount)).replace('$', '')
|
return formatter.format(Math.floor(amount)).replace('$', '')
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,6 +18,7 @@ import { useLiquidity } from 'web/hooks/use-liquidity'
|
||||||
import { BetSignUpPrompt } from '../sign-up-prompt'
|
import { BetSignUpPrompt } from '../sign-up-prompt'
|
||||||
import { PlayMoneyDisclaimer } from '../play-money-disclaimer'
|
import { PlayMoneyDisclaimer } from '../play-money-disclaimer'
|
||||||
import BetButton from '../bet-button'
|
import BetButton from '../bet-button'
|
||||||
|
import { capitalize } from 'lodash'
|
||||||
|
|
||||||
export function ContractTabs(props: {
|
export function ContractTabs(props: {
|
||||||
contract: Contract
|
contract: Contract
|
||||||
|
@ -114,7 +115,7 @@ export function ContractTabs(props: {
|
||||||
badge: `${comments.length}`,
|
badge: `${comments.length}`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: PAST_BETS,
|
title: capitalize(PAST_BETS),
|
||||||
content: betActivity,
|
content: betActivity,
|
||||||
badge: `${visibleBets.length}`,
|
badge: `${visibleBets.length}`,
|
||||||
},
|
},
|
||||||
|
|
|
@ -25,7 +25,7 @@ import { UserFollowButton } from './follow-button'
|
||||||
import { GroupsButton } from 'web/components/groups/groups-button'
|
import { GroupsButton } from 'web/components/groups/groups-button'
|
||||||
import { PortfolioValueSection } from './portfolio/portfolio-value-section'
|
import { PortfolioValueSection } from './portfolio/portfolio-value-section'
|
||||||
import { ReferralsButton } from 'web/components/referrals-button'
|
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 { ShareIconButton } from 'web/components/share-icon-button'
|
||||||
import { ENV_CONFIG } from 'common/envs/constants'
|
import { ENV_CONFIG } from 'common/envs/constants'
|
||||||
import {
|
import {
|
||||||
|
@ -36,6 +36,7 @@ import { REFERRAL_AMOUNT } from 'common/economy'
|
||||||
import { LoansModal } from './profile/loans-modal'
|
import { LoansModal } from './profile/loans-modal'
|
||||||
import { UserLikesButton } from 'web/components/profile/user-likes-button'
|
import { UserLikesButton } from 'web/components/profile/user-likes-button'
|
||||||
import { PAST_BETS } from 'common/user'
|
import { PAST_BETS } from 'common/user'
|
||||||
|
import { capitalize } from 'lodash'
|
||||||
|
|
||||||
export function UserPage(props: { user: User }) {
|
export function UserPage(props: { user: User }) {
|
||||||
const { user } = props
|
const { user } = props
|
||||||
|
@ -270,7 +271,7 @@ export function UserPage(props: { user: User }) {
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: capitalFirst(PAST_BETS),
|
title: capitalize(PAST_BETS),
|
||||||
content: (
|
content: (
|
||||||
<>
|
<>
|
||||||
<BetsList user={user} />
|
<BetsList user={user} />
|
||||||
|
|
Loading…
Reference in New Issue
Block a user