From 2a8aeed510710ce3b8b92970ed2aabc07fef574b Mon Sep 17 00:00:00 2001 From: csawatzky Date: Tue, 4 Nov 2025 10:48:27 -0600 Subject: [PATCH 1/3] hotfix for the gate svg for having two degree symbols --- src/gate/GateSVG.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/gate/GateSVG.tsx b/src/gate/GateSVG.tsx index 20c46d0..64b47d4 100644 --- a/src/gate/GateSVG.tsx +++ b/src/gate/GateSVG.tsx @@ -248,7 +248,7 @@ export default function GateSVG(props: Props) { values.push( - {convertFinalTemp(finalTemp).toFixed(2)}° + {convertFinalTemp(finalTemp).toFixed(2)} {user.settings.temperatureUnit === pond.TemperatureUnit.TEMPERATURE_UNIT_FAHRENHEIT ? "°F" : "°C"} @@ -259,7 +259,7 @@ export default function GateSVG(props: Props) { values.push( - Ambient: {ambientTemp}° + Ambient: {ambientTemp} {user.settings.temperatureUnit === pond.TemperatureUnit.TEMPERATURE_UNIT_FAHRENHEIT ? "°F" : "°C"} @@ -270,11 +270,11 @@ export default function GateSVG(props: Props) { values.push( - T1: {innerTemps.t1}° + T1: {innerTemps.t1} {user.settings.temperatureUnit === pond.TemperatureUnit.TEMPERATURE_UNIT_FAHRENHEIT ? "°F" : "°C"} - , T2: {innerTemps.t2}° + , T2: {innerTemps.t2} {user.settings.temperatureUnit === pond.TemperatureUnit.TEMPERATURE_UNIT_FAHRENHEIT ? "°F" : "°C"} From 6143e0aba1ce2fd7f9e84b42bee9e33ca7b2b661 Mon Sep 17 00:00:00 2001 From: Carter Date: Mon, 10 Nov 2025 12:49:22 -0600 Subject: [PATCH 2/3] got rid of render order error --- src/common/ObjectControls.tsx | 18 +++++++------- src/pages/Contract.tsx | 47 ++++++++++++++++------------------- 2 files changed, 31 insertions(+), 34 deletions(-) diff --git a/src/common/ObjectControls.tsx b/src/common/ObjectControls.tsx index e41ae43..df32828 100644 --- a/src/common/ObjectControls.tsx +++ b/src/common/ObjectControls.tsx @@ -34,14 +34,14 @@ interface Props { } const useStyles = makeStyles((theme: Theme) => ({ - avatar: { - color: useThemeType() === "light" ? theme.palette.common.black : theme.palette.common.white, - backgroundColor: "transparent", - width: theme.spacing(5), - height: theme.spacing(5), - border: "1px solid", - borderColor: theme.palette.divider - } + avatar: { + color: theme.palette.mode === "light" ? theme.palette.common.black : theme.palette.common.white, + backgroundColor: "transparent", + width: theme.spacing(5), + height: theme.spacing(5), + border: "1px solid", + borderColor: theme.palette.divider + } })); export default function ObjectControls(props: Props) { @@ -215,4 +215,4 @@ export default function ObjectControls(props: Props) { ); -} +} \ No newline at end of file diff --git a/src/pages/Contract.tsx b/src/pages/Contract.tsx index 448a852..10f140d 100644 --- a/src/pages/Contract.tsx +++ b/src/pages/Contract.tsx @@ -52,31 +52,28 @@ function TabPanelMine(props: TabPanelProps) { ); } -const useStyles = makeStyles((theme: Theme) => { - const themeType = useThemeType(); - return ({ - inactiveButton: { - color: themeType === "light" ? theme.palette.common.black : theme.palette.common.white, - backgroundColor: "transparent", - width: theme.spacing(5), - height: theme.spacing(5), - border: "1px solid", - borderColor: theme.palette.divider - }, - activeButton: { - color: themeType === "light" ? theme.palette.common.black : theme.palette.common.white, - backgroundColor: theme.palette.primary.main, - width: theme.spacing(5), - height: theme.spacing(5), - border: "1px solid", - borderColor: theme.palette.divider - }, - drawerPaper: { - height: "100%", - width: "30%" - } - }); -}); +const useStyles = makeStyles((theme: Theme) => ({ + inactiveButton: { + color: theme.palette.mode === "light" ? theme.palette.common.black : theme.palette.common.white, + backgroundColor: "transparent", + width: theme.spacing(5), + height: theme.spacing(5), + border: "1px solid", + borderColor: theme.palette.divider + }, + activeButton: { + color: theme.palette.mode === "light" ? theme.palette.common.black : theme.palette.common.white, + backgroundColor: theme.palette.primary.main, + width: theme.spacing(5), + height: theme.spacing(5), + border: "1px solid", + borderColor: theme.palette.divider + }, + drawerPaper: { + height: "100%", + width: "30%" + } +})); export default function Contract() { // const match = useRouteMatch(); From 181f1194e2746fa8cc0d85bbc6a1dcb5e65f9db0 Mon Sep 17 00:00:00 2001 From: Carter Date: Mon, 10 Nov 2025 13:06:40 -0600 Subject: [PATCH 3/3] set loading to false in the finally stage --- src/pages/Contract.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/pages/Contract.tsx b/src/pages/Contract.tsx index 10f140d..c91f9ea 100644 --- a/src/pages/Contract.tsx +++ b/src/pages/Contract.tsx @@ -109,7 +109,7 @@ export default function Contract() { setPermissions(resp.permissions); }); }, [as, contractKey, userAPI, user]); - + useEffect(() => { if (!loading) { setLoading(true); @@ -145,7 +145,9 @@ export default function Contract() { }) .catch(err => { //setInvalid(true); - }); + }).finally(() => { + setLoading(false) + }) } }, [contractKey, contractAPI, as]); // eslint-disable-line react-hooks/exhaustive-deps