replacing the getTemperatureUnit function in units that uses the local storage with a function in the user model to just get it from the user settings
This commit is contained in:
parent
a288c9503a
commit
ce41a2dc05
16 changed files with 188 additions and 178 deletions
|
|
@ -32,7 +32,6 @@ import TemperatureIcon from "component/TemperatureIcon";
|
|||
import FuelIcon from "products/CommonIcons/fuelIcon";
|
||||
import moment from "moment";
|
||||
import Warning from "@mui/icons-material/Warning";
|
||||
import { getTemperatureUnit } from "utils";
|
||||
import ResponsiveDialog from "common/ResponsiveDialog";
|
||||
import { useParams } from "react-router-dom";
|
||||
|
||||
|
|
@ -286,7 +285,7 @@ export default function Heater() {
|
|||
|
||||
const tempUnit = () => {
|
||||
let unit = "°C";
|
||||
if (getTemperatureUnit() === pond.TemperatureUnit.TEMPERATURE_UNIT_FAHRENHEIT) {
|
||||
if (user.tempUnit() === pond.TemperatureUnit.TEMPERATURE_UNIT_FAHRENHEIT) {
|
||||
unit = "°F";
|
||||
}
|
||||
return unit;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue