Fix type error in Analytics

Fixes a type error in Analytics.tsx related to the tickFormatter in the YAxis of the BarChart component. The tickFormatter was receiving a string value instead of a number, causing a TypeScript error. The fix ensures that the value passed to the number formatter is indeed a number.
This commit is contained in:
gpt-engineer-app[bot]
2025-03-08 07:58:10 +00:00
parent cb4c78ebeb
commit 9dc79cb562

View File

@@ -113,17 +113,20 @@ const Analytics = () => {
currency: 'KRW',
notation: 'compact',
maximumFractionDigits: 1
}).format(value)
}).format(Number(value))
}
/>
<Tooltip
formatter={(value) =>
new Intl.NumberFormat('ko-KR', {
formatter={(value) => {
if (typeof value === 'number') {
return new Intl.NumberFormat('ko-KR', {
style: 'currency',
currency: 'KRW',
maximumFractionDigits: 0
}).format(value)
}).format(value);
}
return value;
}}
/>
<Legend />
<Bar