From e889036b36569f819c348ced1ca91020f5a93b47 Mon Sep 17 00:00:00 2001 From: suvarnakale <suvarna.kale@tekditechnologies.com> Date: Tue, 7 Jan 2025 15:31:34 +0530 Subject: [PATCH] Issue #2925 feat : Add header for the workspace - resolve comments - issue fixes --- src/components/Layout.tsx | 3 --- src/components/SideBar.tsx | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/components/Layout.tsx b/src/components/Layout.tsx index bc4bdf2..32d4adb 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<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 diff --git a/src/components/SideBar.tsx b/src/components/SideBar.tsx index fef22a0..d50989e 100644 --- a/src/components/SideBar.tsx +++ b/src/components/SideBar.tsx @@ -80,7 +80,7 @@ const Sidebar: React.FC<SidebarProps> = ({ selectedKey, onSelect }) => { const handleNavigation = (key: string) => { console.log(key); router.push(`/workspace/content/${key}`); - localStorage.setItem("selectedFilters", JSON.stringify([])) + localStorage.setItem("selectedFilters", JSON.stringify([])); onSelect(key); if (isMobile) { setDrawerOpen(false); // Close drawer after selecting in mobile view