From 6143e0aba1ce2fd7f9e84b42bee9e33ca7b2b661 Mon Sep 17 00:00:00 2001 From: Carter Date: Mon, 10 Nov 2025 12:49:22 -0600 Subject: [PATCH] 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();