diff --git a/frontend/src/features/about/system/SystemVersionComponent.js b/frontend/src/features/about/system/SystemVersionComponent.js
index 9644149..615667c 100644
--- a/frontend/src/features/about/system/SystemVersionComponent.js
+++ b/frontend/src/features/about/system/SystemVersionComponent.js
@@ -48,7 +48,7 @@ const SystemVersionComponent = ({ data }) => {
return () => {
mediaQuery.removeListener(handleMatches);
};
- }, []);
+ }, [styles.horizontally, styles.vertical]);
const lastReleaseDate = useMemo(() => {
const format = "DD-MM-YYYY HH:mm:ss";
diff --git a/frontend/src/features/user/profile/card/UserProfileCardContent.js b/frontend/src/features/user/profile/card/UserProfileCardContent.js
index 3d1a6d3..091e220 100644
--- a/frontend/src/features/user/profile/card/UserProfileCardContent.js
+++ b/frontend/src/features/user/profile/card/UserProfileCardContent.js
@@ -2,14 +2,13 @@ import React, { useMemo } from "react";
import PropTypes from "prop-types";
import UserProfilePicture from "./UserProfilePicture";
import ContactOptions from "../contact/ContactOptions";
-import { makeStyles } from "@mui/material/styles";
-import styles from "../styles";
-
-const useStyles = makeStyles(styles);
+import { useTheme } from "@mui/material/styles";
+import { getStyles } from "../styles";
const UserProfileCardContent = ({ userData }) => {
const { profilePictureUrl } = userData;
- const classes = useStyles();
+ const theme = useTheme();
+ const styles = getStyles(theme);
const userName = useMemo(() => `${userData.firstName} ${userData.lastName}`, [userData.firstName, userData.lastName]);
const _contactOptions = useMemo(
@@ -28,7 +27,7 @@ const UserProfileCardContent = ({ userData }) => {
);
return (
-
+
diff --git a/frontend/src/features/user/profile/card/UserProfileComponent.js b/frontend/src/features/user/profile/card/UserProfileComponent.js
index 8d2d5b7..7e63d18 100644
--- a/frontend/src/features/user/profile/card/UserProfileComponent.js
+++ b/frontend/src/features/user/profile/card/UserProfileComponent.js
@@ -5,14 +5,13 @@ import { Card, CardHeader, CardContent } from "@mui/material";
import PageTitle from "../../../../components/common/PageTitle";
import UserProfileCardContent from "./UserProfileCardContent";
import SecurityComponent from "../security/SecurityComponent";
-import styles from "../styles";
-import { makeStyles } from "@mui/material/styles";
-
-const useStyles = makeStyles(styles);
+import { getStyles } from "../styles";
+import { useTheme } from "@mui/material/styles";
const UserProfileComponent = ({ userData }) => {
const { t } = useTranslation();
- const classes = useStyles();
+ const theme = useTheme();
+ const styles = getStyles(theme);
const userLoginDate = useMemo(
() =>
@@ -37,7 +36,7 @@ const UserProfileComponent = ({ userData }) => {
-
+
>
diff --git a/frontend/src/features/user/profile/card/UserProfilePicture.js b/frontend/src/features/user/profile/card/UserProfilePicture.js
index 469d40a..eafc7f0 100644
--- a/frontend/src/features/user/profile/card/UserProfilePicture.js
+++ b/frontend/src/features/user/profile/card/UserProfilePicture.js
@@ -1,16 +1,15 @@
import React from "react";
import PropTypes from "prop-types";
-import { makeStyles } from "@mui/material/styles";
-import style from "../styles";
+import { useTheme } from "@mui/material/styles";
+import { getStyles } from "../styles";
import Avatar from "@mui/material/Avatar";
import DefaultUserProfilePicture from "../../../../assets/images/DefaultUserProfilePicture.png";
-const useStyles = makeStyles(style);
-
const UserProfilePicture = ({ pictureUrl }) => {
- const classes = useStyles();
+ const theme = useTheme();
+ const styles = getStyles(theme);
const url = pictureUrl ?? DefaultUserProfilePicture;
- return
;
+ return
;
};
UserProfilePicture.propTypes = {
diff --git a/frontend/src/features/user/profile/security/SecurityComponent.js b/frontend/src/features/user/profile/security/SecurityComponent.js
index 7ef4414..b08d7c5 100644
--- a/frontend/src/features/user/profile/security/SecurityComponent.js
+++ b/frontend/src/features/user/profile/security/SecurityComponent.js
@@ -1,38 +1,37 @@
import React from "react";
import PropTypes from "prop-types";
import { Paper, Grid, Chip, Typography } from "@mui/material";
-import styles from "../styles";
-import { makeStyles } from "@mui/material/styles";
+import { getStyles } from "../styles";
+import { useTheme } from "@mui/material/styles";
import { useTranslation } from "react-i18next";
-const useStyles = makeStyles(styles);
-
const SecurityComponent = ({ userGroups, userRoles }) => {
const { t } = useTranslation();
- const classes = useStyles();
+ const theme = useTheme();
+ const styles = getStyles(theme);
return (
-
+
{t("User.Profile.Security.UserGroups")}
{userGroups.map(g => (
-
+
))}
-
+
{t("User.Profile.Security.UserRoles")}
{userRoles.map(r => (
-
+
))}
diff --git a/frontend/src/features/user/profile/styles.js b/frontend/src/features/user/profile/styles.js
index 78b98c0..41f9ab7 100644
--- a/frontend/src/features/user/profile/styles.js
+++ b/frontend/src/features/user/profile/styles.js
@@ -1,4 +1,4 @@
-const style = theme => {
+const getStyles = theme => {
return {
section: {
marginTop: theme.spacing(2)
@@ -25,4 +25,4 @@ const style = theme => {
};
};
-export default style;
+export { getStyles };