// hoc/withDockItems.tsx "use client"; import React from "react"; import { observer } from "mobx-react"; import { useParams } from "next/navigation"; import { PlaneNewIcon } from "@plane/propel/icons"; import type { AppSidebarItemData } from "@/components/sidebar/sidebar-item"; import { useWorkspacePaths } from "@/hooks/use-workspace-paths"; type WithDockItemsProps = { dockItems: (AppSidebarItemData & { shouldRender: boolean })[]; }; export function withDockItems

(WrappedComponent: React.ComponentType

) { const ComponentWithDockItems = observer((props: Omit) => { const { workspaceSlug } = useParams(); const { isProjectsPath, isNotificationsPath } = useWorkspacePaths(); const dockItems: (AppSidebarItemData & { shouldRender: boolean })[] = [ { label: "Projects", icon: , href: `/${workspaceSlug}/`, isActive: isProjectsPath && !isNotificationsPath, shouldRender: true, }, ]; return ; }); return ComponentWithDockItems; }