From a8fe416dfbeea723e598420b0c7bc01a36d2e1ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Banno-Cloutier?= <leo.banno-cloutier@savoirfairelinux.com> Date: Sun, 27 Aug 2023 14:47:02 -0400 Subject: [PATCH] jams-react-client: cast makeStyles parameter with Theme Change-Id: I2ce80baf096a3c0228d84dedeb00c2bc1f43c75d --- jams-react-client/src/components/CaSetup/CaSetup.tsx | 3 ++- jams-react-client/src/components/Card/Card.tsx | 2 +- jams-react-client/src/components/Card/CardAvatar.tsx | 2 +- jams-react-client/src/components/Card/CardBody.tsx | 2 +- jams-react-client/src/components/Card/CardFooter.tsx | 2 +- jams-react-client/src/components/Card/CardHeader.tsx | 2 +- jams-react-client/src/components/Card/CardIcon.tsx | 2 +- jams-react-client/src/components/CreateAdmin/CreateAdmin.tsx | 3 ++- jams-react-client/src/components/CustomButtons/Button.tsx | 2 +- jams-react-client/src/components/CustomInput/CustomInput.tsx | 2 +- .../src/components/CustomUiPreview/CustomUiPreview.tsx | 2 +- .../src/components/CustomUiPreview/JamiIdCard.tsx | 2 +- jams-react-client/src/components/CustomUiPreview/TipBox.tsx | 2 +- .../src/components/CustomizedSteppers/CustomizedSteppers.tsx | 3 ++- jams-react-client/src/components/Devices/Devices.tsx | 2 +- jams-react-client/src/components/Drawer/Drawer.tsx | 3 ++- jams-react-client/src/components/Footer/Footer.tsx | 2 +- jams-react-client/src/components/Grid/GridContainer.tsx | 2 +- jams-react-client/src/components/Grid/GridItem.tsx | 2 +- .../src/components/IdentityManagement/IdentityManagement.tsx | 3 ++- jams-react-client/src/components/Navbars/Navbar.tsx | 2 +- .../src/components/PasswordDialog/PasswordDialog.tsx | 2 +- .../src/components/ServerParameters/ServerParameters.tsx | 3 ++- jams-react-client/src/components/Sidebar/Sidebar.tsx | 2 +- jams-react-client/src/layouts/BaseLayout.tsx | 2 +- jams-react-client/src/layouts/ListLayout.tsx | 2 +- jams-react-client/src/layouts/SignIn.tsx | 3 ++- jams-react-client/src/layouts/SignUp.tsx | 3 ++- jams-react-client/src/views/Blueprint/ColorPickerPopup.tsx | 2 +- .../src/views/Blueprint/EditBlueprintConfiguration.tsx | 2 +- .../src/views/Blueprint/EditBlueprintPermissions.tsx | 2 +- jams-react-client/src/views/Blueprint/EditBlueprintUi.tsx | 2 +- jams-react-client/src/views/Blueprints/Blueprints.tsx | 2 +- jams-react-client/src/views/Contacts/Contacts.tsx | 2 +- jams-react-client/src/views/Groups/Groups.tsx | 2 +- jams-react-client/src/views/Settings/General.tsx | 3 ++- jams-react-client/src/views/Settings/Subscription.tsx | 3 ++- jams-react-client/src/views/UserProfile/DisplayUserProfile.tsx | 2 +- .../src/views/UserProfile/EditCreateUserProfile.tsx | 2 +- jams-react-client/src/views/Users/Users.tsx | 2 +- 40 files changed, 50 insertions(+), 40 deletions(-) diff --git a/jams-react-client/src/components/CaSetup/CaSetup.tsx b/jams-react-client/src/components/CaSetup/CaSetup.tsx index 0ceabdd2..e9d35137 100644 --- a/jams-react-client/src/components/CaSetup/CaSetup.tsx +++ b/jams-react-client/src/components/CaSetup/CaSetup.tsx @@ -18,8 +18,9 @@ import Input from "@mui/material/Input"; import Typography from "@mui/material/Typography"; import i18next from "i18next"; +import { Theme } from "@mui/material"; -const useStyles = makeStyles((theme) => ({ +const useStyles = makeStyles((theme: Theme) => ({ paper: { marginTop: theme.spacing(8), display: "flex", diff --git a/jams-react-client/src/components/Card/Card.tsx b/jams-react-client/src/components/Card/Card.tsx index abe1c095..61ad324e 100644 --- a/jams-react-client/src/components/Card/Card.tsx +++ b/jams-react-client/src/components/Card/Card.tsx @@ -8,7 +8,7 @@ import { makeStyles } from "@mui/styles"; // core components import styles from "assets/jss/material-dashboard-react/components/cardStyle"; -const useStyles = makeStyles(styles); +const useStyles = makeStyles(styles as any); export default function Card(props) { const classes = useStyles(); diff --git a/jams-react-client/src/components/Card/CardAvatar.tsx b/jams-react-client/src/components/Card/CardAvatar.tsx index 3d81e39e..fb077986 100644 --- a/jams-react-client/src/components/Card/CardAvatar.tsx +++ b/jams-react-client/src/components/Card/CardAvatar.tsx @@ -8,7 +8,7 @@ import { makeStyles } from "@mui/styles"; import styles from "assets/jss/material-dashboard-react/components/cardAvatarStyle"; -const useStyles = makeStyles(styles); +const useStyles = makeStyles(styles as any); export default function CardAvatar(props) { const classes = useStyles(); diff --git a/jams-react-client/src/components/Card/CardBody.tsx b/jams-react-client/src/components/Card/CardBody.tsx index f51557ed..00dd24b5 100644 --- a/jams-react-client/src/components/Card/CardBody.tsx +++ b/jams-react-client/src/components/Card/CardBody.tsx @@ -8,7 +8,7 @@ import { makeStyles } from "@mui/styles"; // core components import styles from "assets/jss/material-dashboard-react/components/cardBodyStyle"; -const useStyles = makeStyles(styles); +const useStyles = makeStyles(styles as any); export default function CardBody(props) { const classes = useStyles(); diff --git a/jams-react-client/src/components/Card/CardFooter.tsx b/jams-react-client/src/components/Card/CardFooter.tsx index 9ac88ea1..d0b0ae84 100644 --- a/jams-react-client/src/components/Card/CardFooter.tsx +++ b/jams-react-client/src/components/Card/CardFooter.tsx @@ -8,7 +8,7 @@ import { makeStyles } from "@mui/styles"; // core components import styles from "assets/jss/material-dashboard-react/components/cardFooterStyle"; -const useStyles = makeStyles(styles); +const useStyles = makeStyles(styles as any); export default function CardFooter(props) { const classes = useStyles(); diff --git a/jams-react-client/src/components/Card/CardHeader.tsx b/jams-react-client/src/components/Card/CardHeader.tsx index 6c53e905..fd970029 100644 --- a/jams-react-client/src/components/Card/CardHeader.tsx +++ b/jams-react-client/src/components/Card/CardHeader.tsx @@ -8,7 +8,7 @@ import { makeStyles } from "@mui/styles"; // core components import styles from "assets/jss/material-dashboard-react/components/cardHeaderStyle"; -const useStyles = makeStyles(styles); +const useStyles = makeStyles(styles as any); export default function CardHeader(props) { const classes = useStyles(); diff --git a/jams-react-client/src/components/Card/CardIcon.tsx b/jams-react-client/src/components/Card/CardIcon.tsx index 7d3a1c68..f5802e06 100644 --- a/jams-react-client/src/components/Card/CardIcon.tsx +++ b/jams-react-client/src/components/Card/CardIcon.tsx @@ -8,7 +8,7 @@ import { makeStyles } from "@mui/styles"; // core components import styles from "assets/jss/material-dashboard-react/components/cardIconStyle"; -const useStyles = makeStyles(styles); +const useStyles = makeStyles(styles as any); export default function CardIcon(props) { const classes = useStyles(); diff --git a/jams-react-client/src/components/CreateAdmin/CreateAdmin.tsx b/jams-react-client/src/components/CreateAdmin/CreateAdmin.tsx index 683cb668..cea55836 100644 --- a/jams-react-client/src/components/CreateAdmin/CreateAdmin.tsx +++ b/jams-react-client/src/components/CreateAdmin/CreateAdmin.tsx @@ -14,8 +14,9 @@ import { api_path_post_install_admin } from "../../globalUrls"; import auth from "../../auth"; import i18next from "i18next"; +import { Theme } from "@mui/material"; -const useStyles = makeStyles((theme) => ({ +const useStyles = makeStyles((theme: Theme) => ({ paper: { marginTop: theme.spacing(8), display: "flex", diff --git a/jams-react-client/src/components/CustomButtons/Button.tsx b/jams-react-client/src/components/CustomButtons/Button.tsx index f75d2d2e..3b4aeaf5 100644 --- a/jams-react-client/src/components/CustomButtons/Button.tsx +++ b/jams-react-client/src/components/CustomButtons/Button.tsx @@ -8,7 +8,7 @@ import Button from "@mui/material/Button"; import styles from "assets/jss/material-dashboard-react/components/buttonStyle"; -const useStyles = makeStyles(styles); +const useStyles = makeStyles(styles as any); export default function RegularButton(props) { const classes = useStyles(); diff --git a/jams-react-client/src/components/CustomInput/CustomInput.tsx b/jams-react-client/src/components/CustomInput/CustomInput.tsx index 8dc52139..48035f82 100644 --- a/jams-react-client/src/components/CustomInput/CustomInput.tsx +++ b/jams-react-client/src/components/CustomInput/CustomInput.tsx @@ -11,7 +11,7 @@ import Check from "@mui/icons-material/Check"; // core components import styles from "assets/jss/material-dashboard-react/components/customInputStyle"; -const useStyles = makeStyles(styles); +const useStyles = makeStyles(styles as any); export default function CustomInput(props) { const classes = useStyles(); diff --git a/jams-react-client/src/components/CustomUiPreview/CustomUiPreview.tsx b/jams-react-client/src/components/CustomUiPreview/CustomUiPreview.tsx index 6673681b..65a0cacc 100644 --- a/jams-react-client/src/components/CustomUiPreview/CustomUiPreview.tsx +++ b/jams-react-client/src/components/CustomUiPreview/CustomUiPreview.tsx @@ -100,7 +100,7 @@ const styles = { }, }; -const useStyles = makeStyles(styles); +const useStyles = makeStyles(styles as any); interface CustomUiPreviewProps { isOldPreview: boolean; diff --git a/jams-react-client/src/components/CustomUiPreview/JamiIdCard.tsx b/jams-react-client/src/components/CustomUiPreview/JamiIdCard.tsx index 4ec6453d..d020bb24 100644 --- a/jams-react-client/src/components/CustomUiPreview/JamiIdCard.tsx +++ b/jams-react-client/src/components/CustomUiPreview/JamiIdCard.tsx @@ -56,7 +56,7 @@ const styles = { }, }; -const useStyles = makeStyles(styles); +const useStyles = makeStyles(styles as any); interface JamiIdCardProps { color: string; diff --git a/jams-react-client/src/components/CustomUiPreview/TipBox.tsx b/jams-react-client/src/components/CustomUiPreview/TipBox.tsx index cb6748b1..d01a9124 100644 --- a/jams-react-client/src/components/CustomUiPreview/TipBox.tsx +++ b/jams-react-client/src/components/CustomUiPreview/TipBox.tsx @@ -28,7 +28,7 @@ const styles = { }, }; -const useStyles = makeStyles(styles); +const useStyles = makeStyles(styles as any); interface TipBoxProps { color: string; diff --git a/jams-react-client/src/components/CustomizedSteppers/CustomizedSteppers.tsx b/jams-react-client/src/components/CustomizedSteppers/CustomizedSteppers.tsx index 401f588c..d1b4bb10 100644 --- a/jams-react-client/src/components/CustomizedSteppers/CustomizedSteppers.tsx +++ b/jams-react-client/src/components/CustomizedSteppers/CustomizedSteppers.tsx @@ -10,6 +10,7 @@ import GroupAddIcon from "@mui/icons-material/GroupAdd"; import VideoLabelIcon from "@mui/icons-material/VideoLabel"; import i18next from "i18next"; +import { Theme } from "@mui/material"; const useQontoStepIconStyles = makeStyles({ root: { @@ -124,7 +125,7 @@ ColorlibStepIcon.propTypes = { icon: PropTypes.node, }; -const useStyles = makeStyles((theme) => ({ +const useStyles = makeStyles((theme: Theme) => ({ root: { width: "100%", }, diff --git a/jams-react-client/src/components/Devices/Devices.tsx b/jams-react-client/src/components/Devices/Devices.tsx index 45721ea0..06c36eaf 100755 --- a/jams-react-client/src/components/Devices/Devices.tsx +++ b/jams-react-client/src/components/Devices/Devices.tsx @@ -32,7 +32,7 @@ import i18next from "i18next"; import EditDeviceDialog from "./EditDeviceDialog"; import RevokeDeviceDialog from "./RevokeDeviceDialog"; -const useStyles = makeStyles(styles); +const useStyles = makeStyles(styles as any); interface DevicesProps { username: string; diff --git a/jams-react-client/src/components/Drawer/Drawer.tsx b/jams-react-client/src/components/Drawer/Drawer.tsx index fdd421d7..4cfb0bea 100644 --- a/jams-react-client/src/components/Drawer/Drawer.tsx +++ b/jams-react-client/src/components/Drawer/Drawer.tsx @@ -10,12 +10,13 @@ import { ListItem, ListItemText, Avatar, + Theme, } from "@mui/material"; import CustomInput from "components/CustomInput/CustomInput"; import noProfilePicture from "assets/img/faces/no-profile-picture.png"; -const useStyles = makeStyles((theme) => ({ +const useStyles = makeStyles((theme: Theme) => ({ list: { width: "100%", [theme.breakpoints.up("xl")]: { diff --git a/jams-react-client/src/components/Footer/Footer.tsx b/jams-react-client/src/components/Footer/Footer.tsx index 0a6b262d..a8bddce5 100755 --- a/jams-react-client/src/components/Footer/Footer.tsx +++ b/jams-react-client/src/components/Footer/Footer.tsx @@ -4,7 +4,7 @@ import styles from "assets/jss/material-dashboard-react/components/footerStyle"; import pjson from "../../../package.json"; -const useStyles = makeStyles(styles); +const useStyles = makeStyles(styles as any); export default function Footer() { const classes = useStyles(); diff --git a/jams-react-client/src/components/Grid/GridContainer.tsx b/jams-react-client/src/components/Grid/GridContainer.tsx index 46764549..8c3e9718 100644 --- a/jams-react-client/src/components/Grid/GridContainer.tsx +++ b/jams-react-client/src/components/Grid/GridContainer.tsx @@ -10,7 +10,7 @@ const styles = { }, }; -const useStyles = makeStyles(styles); +const useStyles = makeStyles(styles as any); export default function GridContainer(props) { const classes = useStyles(); diff --git a/jams-react-client/src/components/Grid/GridItem.tsx b/jams-react-client/src/components/Grid/GridItem.tsx index 589f93e1..1dc6ffb4 100644 --- a/jams-react-client/src/components/Grid/GridItem.tsx +++ b/jams-react-client/src/components/Grid/GridItem.tsx @@ -10,7 +10,7 @@ const styles = { }, }; -const useStyles = makeStyles(styles); +const useStyles = makeStyles(styles as any); interface GridItemProps extends OverridableComponent<GridTypeMap> { children: React.ReactNode; diff --git a/jams-react-client/src/components/IdentityManagement/IdentityManagement.tsx b/jams-react-client/src/components/IdentityManagement/IdentityManagement.tsx index 13df64f1..0e0127d8 100644 --- a/jams-react-client/src/components/IdentityManagement/IdentityManagement.tsx +++ b/jams-react-client/src/components/IdentityManagement/IdentityManagement.tsx @@ -21,8 +21,9 @@ import auth from "../../auth"; import * as Yup from "yup"; import i18next from "i18next"; +import { Theme } from "@mui/material"; -const useStyles = makeStyles((theme) => ({ +const useStyles = makeStyles((theme: Theme) => ({ paper: { marginTop: theme.spacing(8), display: "flex", diff --git a/jams-react-client/src/components/Navbars/Navbar.tsx b/jams-react-client/src/components/Navbars/Navbar.tsx index 056a5061..b41457ff 100755 --- a/jams-react-client/src/components/Navbars/Navbar.tsx +++ b/jams-react-client/src/components/Navbars/Navbar.tsx @@ -13,7 +13,7 @@ import Button from "components/CustomButtons/Button"; import styles from "assets/jss/material-dashboard-react/components/headerStyle"; -const useStyles = makeStyles(styles); +const useStyles = makeStyles(styles as any); export default function Header(props) { const classes = useStyles(); diff --git a/jams-react-client/src/components/PasswordDialog/PasswordDialog.tsx b/jams-react-client/src/components/PasswordDialog/PasswordDialog.tsx index fdf23d67..2b4e4fda 100644 --- a/jams-react-client/src/components/PasswordDialog/PasswordDialog.tsx +++ b/jams-react-client/src/components/PasswordDialog/PasswordDialog.tsx @@ -49,7 +49,7 @@ const styles = (theme) => ({ }, }); -const useStyles = makeStyles(styles); +const useStyles = makeStyles(styles as any); interface PasswordDialogProps { username: string; diff --git a/jams-react-client/src/components/ServerParameters/ServerParameters.tsx b/jams-react-client/src/components/ServerParameters/ServerParameters.tsx index 9b6a4a3e..acd27d02 100644 --- a/jams-react-client/src/components/ServerParameters/ServerParameters.tsx +++ b/jams-react-client/src/components/ServerParameters/ServerParameters.tsx @@ -22,8 +22,9 @@ import auth from "auth"; import * as Yup from "yup"; import i18next from "i18next"; +import { Theme } from "@mui/material"; -const useStyles = makeStyles((theme) => ({ +const useStyles = makeStyles((theme: Theme) => ({ paper: { marginTop: theme.spacing(8), display: "flex", diff --git a/jams-react-client/src/components/Sidebar/Sidebar.tsx b/jams-react-client/src/components/Sidebar/Sidebar.tsx index d66b2507..3a9fbc1d 100755 --- a/jams-react-client/src/components/Sidebar/Sidebar.tsx +++ b/jams-react-client/src/components/Sidebar/Sidebar.tsx @@ -22,7 +22,7 @@ import auth from "auth"; import i18next from "i18next"; -const useStyles = makeStyles(styles); +const useStyles = makeStyles(styles as any); export default function Sidebar(props) { const classes = useStyles(); diff --git a/jams-react-client/src/layouts/BaseLayout.tsx b/jams-react-client/src/layouts/BaseLayout.tsx index c59c5703..81620015 100644 --- a/jams-react-client/src/layouts/BaseLayout.tsx +++ b/jams-react-client/src/layouts/BaseLayout.tsx @@ -44,7 +44,7 @@ import { AccountCircle as AccountCircleIcon } from "@mui/icons-material"; let ps; -const useStyles = makeStyles(styles); +const useStyles = makeStyles(styles as any); export default function Admin(props) { // styles diff --git a/jams-react-client/src/layouts/ListLayout.tsx b/jams-react-client/src/layouts/ListLayout.tsx index c95207ee..3ecd4c97 100644 --- a/jams-react-client/src/layouts/ListLayout.tsx +++ b/jams-react-client/src/layouts/ListLayout.tsx @@ -44,7 +44,7 @@ import i18next from "i18next"; let ps; -const useStyles = makeStyles(styles); +const useStyles = makeStyles(styles as any); export default function Admin(props) { // styles diff --git a/jams-react-client/src/layouts/SignIn.tsx b/jams-react-client/src/layouts/SignIn.tsx index 691bda61..c08118b3 100644 --- a/jams-react-client/src/layouts/SignIn.tsx +++ b/jams-react-client/src/layouts/SignIn.tsx @@ -18,6 +18,7 @@ import i18next from "i18next"; import logo from "assets/img/jams_logo_no_gnu_package.svg"; import * as Yup from "yup"; +import { Theme } from "@mui/material"; function Alert(props) { return <MuiAlert elevation={6} variant="filled" {...props} />; } @@ -35,7 +36,7 @@ function Copyright() { ); } -const useStyles = makeStyles((theme) => ({ +const useStyles = makeStyles((theme: Theme) => ({ paper: { marginTop: theme.spacing(8), display: "flex", diff --git a/jams-react-client/src/layouts/SignUp.tsx b/jams-react-client/src/layouts/SignUp.tsx index 6b7a9305..fdbd27e4 100644 --- a/jams-react-client/src/layouts/SignUp.tsx +++ b/jams-react-client/src/layouts/SignUp.tsx @@ -17,6 +17,7 @@ import IdentityManagement from "components/IdentityManagement/IdentityManagement import ServerParameters from "components/ServerParameters/ServerParameters"; import LanguagePicker from "../components/LanguagePicker/LanguagePicker"; +import { Theme } from "@mui/material"; function Alert(props) { return <MuiAlert elevation={6} variant="filled" {...props} />; @@ -34,7 +35,7 @@ function Copyright() { ); } -const useStyles = makeStyles((theme) => ({ +const useStyles = makeStyles((theme: Theme) => ({ avatar: { margin: theme.spacing(1), backgroundColor: theme.palette.secondary.main, diff --git a/jams-react-client/src/views/Blueprint/ColorPickerPopup.tsx b/jams-react-client/src/views/Blueprint/ColorPickerPopup.tsx index 62a775fa..c37b7063 100644 --- a/jams-react-client/src/views/Blueprint/ColorPickerPopup.tsx +++ b/jams-react-client/src/views/Blueprint/ColorPickerPopup.tsx @@ -31,7 +31,7 @@ const styles = { }, }; -const useStyles = makeStyles(styles); +const useStyles = makeStyles(styles as any); export default function ColorPickerPopup({ hasAlphaChannel, color, onChange }) { const classes = useStyles(); diff --git a/jams-react-client/src/views/Blueprint/EditBlueprintConfiguration.tsx b/jams-react-client/src/views/Blueprint/EditBlueprintConfiguration.tsx index 76a14576..f2a921e7 100644 --- a/jams-react-client/src/views/Blueprint/EditBlueprintConfiguration.tsx +++ b/jams-react-client/src/views/Blueprint/EditBlueprintConfiguration.tsx @@ -139,7 +139,7 @@ const styles = () => ({ }, }); -const useStyles = makeStyles(styles); +const useStyles = makeStyles(styles as any); // Inspired by blueprintjs const StyledRadio = (props) => { diff --git a/jams-react-client/src/views/Blueprint/EditBlueprintPermissions.tsx b/jams-react-client/src/views/Blueprint/EditBlueprintPermissions.tsx index 9bd45d98..d1511c11 100644 --- a/jams-react-client/src/views/Blueprint/EditBlueprintPermissions.tsx +++ b/jams-react-client/src/views/Blueprint/EditBlueprintPermissions.tsx @@ -98,7 +98,7 @@ const styles = { }, }; -const useStyles = makeStyles(styles); +const useStyles = makeStyles(styles as any); export default function EditBlueprintPermissions(props) { const classes = useStyles(); diff --git a/jams-react-client/src/views/Blueprint/EditBlueprintUi.tsx b/jams-react-client/src/views/Blueprint/EditBlueprintUi.tsx index ddea4eee..c8368b22 100644 --- a/jams-react-client/src/views/Blueprint/EditBlueprintUi.tsx +++ b/jams-react-client/src/views/Blueprint/EditBlueprintUi.tsx @@ -88,7 +88,7 @@ const styles = { }, }; -const useStyles = makeStyles(styles); +const useStyles = makeStyles(styles as any); export default function EditBlueprintUi({ blueprintName }) { const classes = useStyles(); diff --git a/jams-react-client/src/views/Blueprints/Blueprints.tsx b/jams-react-client/src/views/Blueprints/Blueprints.tsx index 63013b91..1ea665af 100644 --- a/jams-react-client/src/views/Blueprints/Blueprints.tsx +++ b/jams-react-client/src/views/Blueprints/Blueprints.tsx @@ -72,7 +72,7 @@ const styles = { }, }; -const useStyles = makeStyles(styles); +const useStyles = makeStyles(styles as any); export default function Blueprints() { const classes = useStyles(); diff --git a/jams-react-client/src/views/Contacts/Contacts.tsx b/jams-react-client/src/views/Contacts/Contacts.tsx index d51149c6..cfcaed83 100644 --- a/jams-react-client/src/views/Contacts/Contacts.tsx +++ b/jams-react-client/src/views/Contacts/Contacts.tsx @@ -81,7 +81,7 @@ const styles = { }, }; -const useStyles = makeStyles(styles); +const useStyles = makeStyles(styles as any); export default function Users(props) { const classes = useStyles(); diff --git a/jams-react-client/src/views/Groups/Groups.tsx b/jams-react-client/src/views/Groups/Groups.tsx index 0a2efa75..f20f73b8 100644 --- a/jams-react-client/src/views/Groups/Groups.tsx +++ b/jams-react-client/src/views/Groups/Groups.tsx @@ -80,7 +80,7 @@ const styles = { }, }; -const useStyles = makeStyles(styles); +const useStyles = makeStyles(styles as any); export default function Groups() { const classes = useStyles(); diff --git a/jams-react-client/src/views/Settings/General.tsx b/jams-react-client/src/views/Settings/General.tsx index 5b77b912..09561994 100644 --- a/jams-react-client/src/views/Settings/General.tsx +++ b/jams-react-client/src/views/Settings/General.tsx @@ -32,8 +32,9 @@ import LanguagePicker from "../../components/LanguagePicker/LanguagePicker"; import pjson from "../../../package.json"; import generator from "generate-password-browser"; +import { Theme } from "@mui/material"; -const useStyles = makeStyles((theme) => ({ +const useStyles = makeStyles((theme: Theme) => ({ paper: { marginTop: theme.spacing(8), display: "flex", diff --git a/jams-react-client/src/views/Settings/Subscription.tsx b/jams-react-client/src/views/Settings/Subscription.tsx index 0533c56b..697eec9a 100644 --- a/jams-react-client/src/views/Settings/Subscription.tsx +++ b/jams-react-client/src/views/Settings/Subscription.tsx @@ -17,8 +17,9 @@ import configApiCall from "../../api"; import { api_path_post_configuration_register_license } from "../../globalUrls"; import i18next from "i18next"; +import { Theme } from "@mui/material"; -const useStyles = makeStyles((theme) => ({ +const useStyles = makeStyles((theme: Theme) => ({ paper: { marginTop: theme.spacing(8), display: "flex", diff --git a/jams-react-client/src/views/UserProfile/DisplayUserProfile.tsx b/jams-react-client/src/views/UserProfile/DisplayUserProfile.tsx index 2c85ca41..972d59e5 100644 --- a/jams-react-client/src/views/UserProfile/DisplayUserProfile.tsx +++ b/jams-react-client/src/views/UserProfile/DisplayUserProfile.tsx @@ -166,7 +166,7 @@ const styles = (theme) => ({ }, }); -const useStyles = makeStyles(styles); +const useStyles = makeStyles(styles as any); interface DisplayUserProfileProps { setDisplayUser: (displayUser: boolean) => void; diff --git a/jams-react-client/src/views/UserProfile/EditCreateUserProfile.tsx b/jams-react-client/src/views/UserProfile/EditCreateUserProfile.tsx index 2b1fbefd..6de3cb0f 100644 --- a/jams-react-client/src/views/UserProfile/EditCreateUserProfile.tsx +++ b/jams-react-client/src/views/UserProfile/EditCreateUserProfile.tsx @@ -216,7 +216,7 @@ const styles = (theme) => ({ }, }); -const useStyles = makeStyles(styles); +const useStyles = makeStyles(styles as any); const toBase64 = (file: File): Promise<string | undefined> => new Promise((resolve, reject) => { diff --git a/jams-react-client/src/views/Users/Users.tsx b/jams-react-client/src/views/Users/Users.tsx index 5757f1d0..301e58ee 100644 --- a/jams-react-client/src/views/Users/Users.tsx +++ b/jams-react-client/src/views/Users/Users.tsx @@ -68,7 +68,7 @@ const styles = { wordWrap: "break-word", }, }; -const useStyles = makeStyles(styles); +const useStyles = makeStyles(styles as any); export default function Users() { const classes = useStyles(); const history = useHistory(); -- GitLab