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:
csawatzky 2026-03-25 15:45:59 -06:00
parent a288c9503a
commit ce41a2dc05
16 changed files with 188 additions and 178 deletions

View file

@ -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;