diff --git a/apps/frontend/src/features/analysis/components/MonthlyVariationTable.tsx b/apps/frontend/src/features/analysis/components/MonthlyVariationTable.tsx
index e2f50dc..88c5840 100644
--- a/apps/frontend/src/features/analysis/components/MonthlyVariationTable.tsx
+++ b/apps/frontend/src/features/analysis/components/MonthlyVariationTable.tsx
@@ -4,12 +4,18 @@ import { useInflation, useMonthlyLast } from "@/lib/queries";
type MonthKey = string;
+type CurrencyValues = {
+ variation: number | null;
+ prev: number | null;
+ current: number | null;
+};
+
type MonthRow = {
month: MonthKey;
label: string;
- BELO: number | null;
- BLUE: number | null;
- BNA: number | null;
+ BELO: CurrencyValues;
+ BLUE: CurrencyValues;
+ BNA: CurrencyValues;
inflation: number | null;
};
@@ -38,12 +44,25 @@ function formatPct(value: number): string {
return `${sign}${value.toFixed(1)}%`;
}
+const priceFormatter = new Intl.NumberFormat("es-AR", {
+ minimumFractionDigits: 0,
+ maximumFractionDigits: 0,
+});
+
+function formatPrice(value: number): string {
+ return `$${priceFormatter.format(value)}`;
+}
+
function VariationIndicator({
variation,
inflation,
+ prev,
+ current,
}: {
variation: number | null;
inflation: number | null;
+ prev: number | null;
+ current: number | null;
}) {
if (variation === null) {
return (
@@ -54,32 +73,19 @@ function VariationIndicator({
);
}
- if (inflation === null) {
- const isPositive = variation >= 0;
- return (
-
- {isPositive ? (
-
BELO
Blue