Skip to content

Commit

Permalink
Merge pull request #165 from suvarnakale/release-1.0.0
Browse files Browse the repository at this point in the history
Issue #2925 chore : header changes removed
  • Loading branch information
itsvick authored Jan 9, 2025
2 parents d766a93 + 307cc72 commit 48f6f12
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
6 changes: 1 addition & 5 deletions src/components/Layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -14,8 +13,6 @@ interface LayoutProps {

const Layout: React.FC<LayoutProps> = ({ 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
Expand Down Expand Up @@ -110,9 +107,8 @@ const Layout: React.FC<LayoutProps> = ({ 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)",
Expand Down
5 changes: 0 additions & 5 deletions src/components/SideBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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: <AddOutlinedIcon /> },
Expand Down Expand Up @@ -210,7 +206,6 @@ const Sidebar: React.FC<SidebarProps> = ({ selectedKey, onSelect }) => {
sx={{
margin: 2,
cursor: "pointer",
color: isAdmin ? "white" : "black",
}}
onClick={toggleDrawer}
/>
Expand Down

0 comments on commit 48f6f12

Please sign in to comment.