Fix number formatting

This commit is contained in:
Anton Tananaev 2024-05-09 06:34:04 -07:00
parent 860e980c17
commit f6d15a1a44

View File

@ -23,11 +23,11 @@ export const formatNumber = (value, precision = 1) => Number(value.toFixed(preci
export const formatPercentage = (value) => `${value}%`;
export const formatTemperature = (value) => `${value}°C`;
export const formatTemperature = (value) => `${value.toFixed(1)}°C`;
export const formatVoltage = (value, t) => `${value} ${t('sharedVoltAbbreviation')}`;
export const formatVoltage = (value, t) => `${value.toFixed(2)} ${t('sharedVoltAbbreviation')}`;
export const formatConsumption = (value, t) => `${value} ${t('sharedLiterPerHourAbbreviation')}`;
export const formatConsumption = (value, t) => `${value.toFixed(2)} ${t('sharedLiterPerHourAbbreviation')}`;
export const formatTime = (value, format, hours12) => {
if (value) {