diff --git a/src/components/DigitalTwin/index.js b/src/components/DigitalTwin/index.js index 8367a10..d581c9b 100644 --- a/src/components/DigitalTwin/index.js +++ b/src/components/DigitalTwin/index.js @@ -1,7 +1,7 @@ import React from "react"; import { LocalDateTimeString } from "../../utils/dates"; -import { ValidateLocationByParam } from "../../utils/locations" +import { ValidateLocationByParam } from "../../utils/locations"; import useStyles from "../useStyles"; const keyValueTemplate = (key, value) => ( @@ -58,11 +58,10 @@ const DigitalTwin = (props) => {

Misc Windows

{Object.entries(misc_windows).map((value) => { - if (value[1] === 0) { - return keyValueTemplate(value[0], "closed"); + if (value[1] === 0 || value[1] > 100) { + return keyValueTemplate(value[0], `closed ${value[1]}%`); } else { - const percentOpen = Math.min(value[1], 100); - return keyValueTemplate(value[0], `${percentOpen}% open`); + return keyValueTemplate(value[0], `${value[1]}% open`); } })}