import { useEffect } from "react"; import { observer } from "mobx-react"; import { useRouter } from "next/router"; import { BarChart2, PanelRight } from "lucide-react"; // ui import { Breadcrumbs } from "@plane/ui"; // components import { BreadcrumbLink } from "components/common"; import { SidebarHamburgerToggle } from "components/core/sidebar/sidebar-menu-hamburger-toggle"; import { cn } from "helpers/common.helper"; import { useApplication } from "hooks/store"; export const WorkspaceAnalyticsHeader = observer(() => { const router = useRouter(); const { analytics_tab } = router.query; const { theme: themeStore } = useApplication(); useEffect(() => { const handleToggleWorkspaceAnalyticsSidebar = () => { if (window && window.innerWidth < 768) { themeStore.toggleWorkspaceAnalyticsSidebar(true); } if (window && themeStore.workspaceAnalyticsSidebarCollapsed && window.innerWidth >= 768) { themeStore.toggleWorkspaceAnalyticsSidebar(false); } }; window.addEventListener("resize", handleToggleWorkspaceAnalyticsSidebar); handleToggleWorkspaceAnalyticsSidebar(); return () => window.removeEventListener("resize", handleToggleWorkspaceAnalyticsSidebar); }, [themeStore]); return ( <>
} /> } /> {analytics_tab === "custom" && ( )}
); });