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();