Unhardcode M$ in more locations
This commit is contained in:
parent
8982dcae10
commit
a3c1cd2cc1
|
@ -4,6 +4,7 @@ import { formatMoney } from 'common/util/format'
|
||||||
import { Col } from './layout/col'
|
import { Col } from './layout/col'
|
||||||
import { Spacer } from './layout/spacer'
|
import { Spacer } from './layout/spacer'
|
||||||
import { SiteLink } from './site-link'
|
import { SiteLink } from './site-link'
|
||||||
|
import { ENV_CONFIG } from 'common/envs/constants'
|
||||||
|
|
||||||
export function AmountInput(props: {
|
export function AmountInput(props: {
|
||||||
amount: number | undefined
|
amount: number | undefined
|
||||||
|
@ -120,7 +121,7 @@ export function BuyAmountInput(props: {
|
||||||
<AmountInput
|
<AmountInput
|
||||||
amount={amount}
|
amount={amount}
|
||||||
onChange={onAmountChange}
|
onChange={onAmountChange}
|
||||||
label="M$"
|
label={ENV_CONFIG.moneyMoniker}
|
||||||
error={error}
|
error={error}
|
||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
className={className}
|
className={className}
|
||||||
|
|
|
@ -12,6 +12,7 @@ import clsx from 'clsx'
|
||||||
import { Row } from './layout/row'
|
import { Row } from './layout/row'
|
||||||
import { ENV_CONFIG } from '../../common/envs/constants'
|
import { ENV_CONFIG } from '../../common/envs/constants'
|
||||||
import { SiteLink } from './site-link'
|
import { SiteLink } from './site-link'
|
||||||
|
import { formatMoney } from 'common/util/format'
|
||||||
|
|
||||||
export function FeedPromo(props: { hotContracts: Contract[] }) {
|
export function FeedPromo(props: { hotContracts: Contract[] }) {
|
||||||
const { hotContracts } = props
|
const { hotContracts } = props
|
||||||
|
@ -29,7 +30,7 @@ export function FeedPromo(props: { hotContracts: Contract[] }) {
|
||||||
<div className="mb-4 px-2 text-gray-500">
|
<div className="mb-4 px-2 text-gray-500">
|
||||||
Bet on any topic imaginable. Or create your own market!
|
Bet on any topic imaginable. Or create your own market!
|
||||||
<br />
|
<br />
|
||||||
Sign up and get M$1,000 - worth $10 to your{' '}
|
Sign up and get {formatMoney(1000)} - worth $10 to your{' '}
|
||||||
<SiteLink className="font-semibold" href="/charity">
|
<SiteLink className="font-semibold" href="/charity">
|
||||||
favorite charity.
|
favorite charity.
|
||||||
</SiteLink>
|
</SiteLink>
|
||||||
|
|
|
@ -8,6 +8,7 @@ import { Page } from 'web/components/page'
|
||||||
import { SiteLink } from 'web/components/site-link'
|
import { SiteLink } from 'web/components/site-link'
|
||||||
import { Title } from 'web/components/title'
|
import { Title } from 'web/components/title'
|
||||||
import { getAllCharityTxns } from 'web/lib/firebase/txns'
|
import { getAllCharityTxns } from 'web/lib/firebase/txns'
|
||||||
|
import { formatMoney } from 'common/util/format'
|
||||||
|
|
||||||
export async function getStaticProps() {
|
export async function getStaticProps() {
|
||||||
const txns = await getAllCharityTxns()
|
const txns = await getAllCharityTxns()
|
||||||
|
@ -57,7 +58,8 @@ export default function Charity(props: {
|
||||||
<Title className="!mt-0" text="Manifold for Good" />
|
<Title className="!mt-0" text="Manifold for Good" />
|
||||||
<div className="mb-6 text-gray-500">
|
<div className="mb-6 text-gray-500">
|
||||||
Donate your winnings to charity! Through the month of May, every
|
Donate your winnings to charity! Through the month of May, every
|
||||||
M$100 you contribute turns into $1 USD sent to your chosen charity.
|
{formatMoney(100)} you contribute turns into $1 USD sent to your
|
||||||
|
chosen charity.
|
||||||
<Spacer h={5} />
|
<Spacer h={5} />
|
||||||
Together we've donated over ${Math.floor(totalRaised / 100)} USD so
|
Together we've donated over ${Math.floor(totalRaised / 100)} USD so
|
||||||
far!
|
far!
|
||||||
|
|
Loading…
Reference in New Issue
Block a user