Merge pull request #21556 from overleaf/em-subscription-change-interstitial

Add-on purchase preview page

GitOrigin-RevId: 660e39a94e6112af020ea783d6acf01a19432605
This commit is contained in:
Eric Mc Sween
2024-11-07 09:04:49 +00:00
committed by Copybot
parent bc1e3dacda
commit 29be4f66d4
23 changed files with 708 additions and 99 deletions
@@ -1,26 +1,11 @@
export type CurrencyCode =
| 'AUD'
| 'BRL'
| 'CAD'
| 'CHF'
| 'CLP'
| 'COP'
| 'DKK'
| 'EUR'
| 'GBP'
| 'INR'
| 'MXN'
| 'NOK'
| 'NZD'
| 'PEN'
| 'SEK'
| 'SGD'
| 'USD'
import getMeta from '@/utils/meta'
const DEFAULT_LOCALE = getMeta('ol-i18n')?.currentLangCode ?? 'en'
export function formatCurrencyLocalized(
amount: number,
currency: CurrencyCode,
locale: string,
currency: string,
locale: string = DEFAULT_LOCALE,
stripIfInteger = false
): string {
const options: Intl.NumberFormatOptions = { style: 'currency', currency }