Commit 4b54e638 authored by Pithon Kabiro's avatar Pithon Kabiro
Browse files

Edit function: match measurement unit to symbol

Remove intermediate references
parent 1d5c8408
......@@ -8,16 +8,13 @@
const matchUnitOfMeasurementSymbolStringToSymbol = function (
unitOfMeasurementSymbolString
) {
const unicodeCodePointDegreeSymbol = "\u00B0";
const unicodeCodePointSuperscriptThree = "\u00B3";
// Symbol - temperature
if (unitOfMeasurementSymbolString === "degC") {
return `${unicodeCodePointDegreeSymbol}C`;
return "\u00B0C";
}
// Symbol - flow rate
else if (unitOfMeasurementSymbolString === "m3/h") {
return `m${unicodeCodePointSuperscriptThree}/h`;
return "m\u00B3/h";
}
// If no symbol exists
else {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment