From 409bb3262f1b0452970659b7fed3b13fc342efd5 Mon Sep 17 00:00:00 2001 From: Daniel Cojocea Date: Sat, 7 Sep 2024 14:54:19 -0400 Subject: [PATCH] Prevent scrollbar from shifting content --- Client/src/Components/Sidebar/index.jsx | 2 ++ Client/src/Pages/Account/index.jsx | 2 +- Client/src/Utils/Theme/darkTheme.js | 1 + Client/src/Utils/Theme/lightTheme.js | 1 + 4 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Client/src/Components/Sidebar/index.jsx b/Client/src/Components/Sidebar/index.jsx index 27fb35329..2ffe5d968 100644 --- a/Client/src/Components/Sidebar/index.jsx +++ b/Client/src/Components/Sidebar/index.jsx @@ -306,6 +306,7 @@ function Sidebar() { anchorEl={anchorEl} open={Boolean(anchorEl) && popup === item.name} onClose={closePopup} + disableScrollLock anchorOrigin={{ vertical: "top", horizontal: "right", @@ -591,6 +592,7 @@ function Sidebar() { anchorEl={anchorEl} open={Boolean(anchorEl) && popup === "logout"} onClose={closePopup} + disableScrollLock anchorOrigin={{ vertical: "top", horizontal: "right", diff --git a/Client/src/Pages/Account/index.jsx b/Client/src/Pages/Account/index.jsx index 4f5b0c440..5543b38ee 100644 --- a/Client/src/Pages/Account/index.jsx +++ b/Client/src/Pages/Account/index.jsx @@ -25,7 +25,7 @@ const Account = ({ open = "profile" }) => { const { user } = useSelector((state) => state.auth); const requiredRoles = ["superadmin", "admin"]; - let tabList = ["Profile", "Team", "Password"]; + let tabList = ["Profile", "Password", "Team"]; const hideTeams = !requiredRoles.some((role) => user.role.includes(role)); if (hideTeams) { tabList = ["Profile", "Password"]; diff --git a/Client/src/Utils/Theme/darkTheme.js b/Client/src/Utils/Theme/darkTheme.js index b86dedeae..261f8135f 100644 --- a/Client/src/Utils/Theme/darkTheme.js +++ b/Client/src/Utils/Theme/darkTheme.js @@ -80,6 +80,7 @@ const darkTheme = createTheme({ backgroundImage: "radial-gradient(circle, #09090b, #0c0c0e, #0f0f11, #111113, #131315, #131315, #131315, #131315, #111113, #0f0f11, #0c0c0e, #09090b)", lineHeight: "inherit", + paddingLeft: "calc(100vw - 100%)", }, }, }, diff --git a/Client/src/Utils/Theme/lightTheme.js b/Client/src/Utils/Theme/lightTheme.js index 4fc565da3..f00ece091 100644 --- a/Client/src/Utils/Theme/lightTheme.js +++ b/Client/src/Utils/Theme/lightTheme.js @@ -77,6 +77,7 @@ const lightTheme = createTheme({ backgroundImage: "radial-gradient(circle, #fcfcfd, #fdfcfd, #fdfdfd, #fefdfe, #fefefe, #fefefe, #fefefe, #fefefe, #fefdfe, #fdfdfd, #fdfcfd, #fcfcfd)", lineHeight: "inherit", + paddingLeft: "calc(100vw - 100%)", }, }, },