From a3c1cd2cc159687603f515eccc308db0d5e93f67 Mon Sep 17 00:00:00 2001 From: Austin Chen Date: Tue, 17 May 2022 08:17:22 -0400 Subject: [PATCH] Unhardcode M$ in more locations --- web/components/amount-input.tsx | 3 ++- web/components/feed-create.tsx | 3 ++- web/pages/charity/index.tsx | 4 +++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/web/components/amount-input.tsx b/web/components/amount-input.tsx index 767628a0..84a29b6d 100644 --- a/web/components/amount-input.tsx +++ b/web/components/amount-input.tsx @@ -4,6 +4,7 @@ import { formatMoney } from 'common/util/format' import { Col } from './layout/col' import { Spacer } from './layout/spacer' import { SiteLink } from './site-link' +import { ENV_CONFIG } from 'common/envs/constants' export function AmountInput(props: { amount: number | undefined @@ -120,7 +121,7 @@ export function BuyAmountInput(props: { Bet on any topic imaginable. Or create your own market!
- Sign up and get M$1,000 - worth $10 to your{' '} + Sign up and get {formatMoney(1000)} - worth $10 to your{' '} favorite charity. diff --git a/web/pages/charity/index.tsx b/web/pages/charity/index.tsx index 09b9de0c..d05f7a91 100644 --- a/web/pages/charity/index.tsx +++ b/web/pages/charity/index.tsx @@ -8,6 +8,7 @@ import { Page } from 'web/components/page' import { SiteLink } from 'web/components/site-link' import { Title } from 'web/components/title' import { getAllCharityTxns } from 'web/lib/firebase/txns' +import { formatMoney } from 'common/util/format' export async function getStaticProps() { const txns = await getAllCharityTxns() @@ -57,7 +58,8 @@ export default function Charity(props: { <div className="mb-6 text-gray-500"> 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} /> Together we've donated over ${Math.floor(totalRaised / 100)} USD so far!