Skip to content

OpenPanel is an open-source web and product analytics platform, an open-source alternative to Mixpanel with optional self-hosting.

fix(dashboard): format currency better on all places

Carl-Gerhard Lindesvärda26e64e80dbc
diff --git a/apps/dashboard/src/hooks/useNumerFormatter.ts b/apps/dashboard/src/hooks/useNumerFormatter.ts
index 93a10895d..b5e7feb4c 100644
--- a/apps/dashboard/src/hooks/useNumerFormatter.ts
+++ b/apps/dashboard/src/hooks/useNumerFormatter.ts
@@ -33,7 +33,7 @@ export const formatCurrency =
style: 'currency',
currency: currency,
minimumFractionDigits: 0,
- maximumFractionDigits: 0,
+ maximumFractionDigits: 1,
}).format(amount);
};
diff --git a/apps/public/components/pricing-slider.tsx b/apps/public/components/pricing-slider.tsx
index 8d61c8c76..11b153adb 100644
--- a/apps/public/components/pricing-slider.tsx
+++ b/apps/public/components/pricing-slider.tsx
@@ -45,7 +45,8 @@ export function PricingSlider() {
format={{
style: 'currency',
currency: 'USD',
- maximumFractionDigits: 0,
+ minimumFractionDigits: 0,
+ maximumFractionDigits: 1,
}}
locales={'en-US'}
/>