diff --git a/src/components/Layout.tsx b/src/components/Layout.tsx index bc4bdf2..a70a1b4 100644 --- a/src/components/Layout.tsx +++ b/src/components/Layout.tsx @@ -4,7 +4,6 @@ import Sidebar from "./SideBar"; import { Toaster, toast } from "react-hot-toast"; import CloseIcon from "@mui/icons-material/Close"; import PersonalVideoIcon from "@mui/icons-material/PersonalVideo"; -import { useRouter } from "next/router"; interface LayoutProps { children: React.ReactNode; @@ -14,8 +13,6 @@ interface LayoutProps { const Layout: React.FC = ({ children, selectedKey, onSelect }) => { const [toastShown, setToastShown] = useState(false); - const router = useRouter(); - const isCreatePath = router.pathname === "/content/create"; useEffect(() => { // Check localStorage to see if the toast has been dismissed @@ -110,9 +107,8 @@ const Layout: React.FC = ({ children, selectedKey, onSelect }) => { maxHeight: "132vh", minHeight: "100vh", "@media (max-width: 900px)": { - position: "fixed", + position: "absolute", top: "3px", - zIndex: "99999", }, "@media (min-width: 900px)": { background: "linear-gradient(to bottom, white, #F8EFDA)", diff --git a/src/components/SideBar.tsx b/src/components/SideBar.tsx index 02e6d3b..9aaf842 100644 --- a/src/components/SideBar.tsx +++ b/src/components/SideBar.tsx @@ -27,10 +27,6 @@ import { Role } from "@/utils/app.constant"; import { getLocalStoredUserRole } from "@/services/LocalStorageService"; const userRole = getLocalStoredUserRole(); -let isAdmin: boolean; -if (typeof window !== "undefined" && typeof localStorage !== "undefined") { - isAdmin = localStorage.getItem("adminInfo") ? true : false; -} // Updated menu items with icons const menuItems = [ { text: "Create", key: "create", icon: }, @@ -210,7 +206,6 @@ const Sidebar: React.FC = ({ selectedKey, onSelect }) => { sx={{ margin: 2, cursor: "pointer", - color: isAdmin ? "white" : "black", }} onClick={toggleDrawer} />