From add5ae2734099bed0507c0eb0a873b8f3f9c2e5c Mon Sep 17 00:00:00 2001 From: Tudor Stanciu Date: Sat, 30 Mar 2024 13:57:07 +0200 Subject: [PATCH] Remove unused styles and dependencies from ProfileButton.js --- .../src/components/layout/ProfileButton.js | 10 ++---- frontend/src/components/layout/styles.js | 35 ------------------- 2 files changed, 3 insertions(+), 42 deletions(-) delete mode 100644 frontend/src/components/layout/styles.js diff --git a/frontend/src/components/layout/ProfileButton.js b/frontend/src/components/layout/ProfileButton.js index c6aff69..5843a57 100644 --- a/frontend/src/components/layout/ProfileButton.js +++ b/frontend/src/components/layout/ProfileButton.js @@ -7,15 +7,11 @@ import SettingsIcon from "@mui/icons-material/Settings"; import { useNavigate } from "react-router-dom"; import { useTuitioClient } from "@flare/tuitio-client-react"; import { useToast } from "../../hooks"; -import { getStyles } from "./styles"; -import { useTheme } from "@mui/material/styles"; import { useTranslation } from "react-i18next"; const ProfileButton = () => { const navigate = useNavigate(); const { error } = useToast(); - const theme = useTheme(); - const styles = getStyles(theme); const { t } = useTranslation(); const { logout } = useTuitioClient({ @@ -66,7 +62,7 @@ const ProfileButton = () => { handleClose(); }} > - + {t("User.Profile.Label")} @@ -77,13 +73,13 @@ const ProfileButton = () => { handleClose(); }} > - + {t("User.Settings")} - + {t("User.Logout")} diff --git a/frontend/src/components/layout/styles.js b/frontend/src/components/layout/styles.js deleted file mode 100644 index 4c9d070..0000000 --- a/frontend/src/components/layout/styles.js +++ /dev/null @@ -1,35 +0,0 @@ -const drawerWidth = 240; - -const getStyles = theme => ({ - appBar: { - zIndex: theme.zIndex.drawer + 1, - transition: theme.transitions.create(["width", "margin"], { - easing: theme.transitions.easing.sharp, - duration: theme.transitions.duration.leavingScreen - }) - }, - appBarShift: { - marginLeft: drawerWidth, - width: `calc(100% - ${drawerWidth}px)`, - transition: theme.transitions.create(["width", "margin"], { - easing: theme.transitions.easing.sharp, - duration: theme.transitions.duration.enteringScreen - }) - }, - menuButton: { - marginRight: 36 - }, - hide: { - display: "none" - }, - drawer: { - width: drawerWidth, - flexShrink: 0, - whiteSpace: "nowrap" - }, - menuItemIcon: { - minWidth: "26px" - } -}); - -export { getStyles };