import { useRouter } from "next/router"; import { Search, Plus, Briefcase } from "lucide-react"; // ui import { Breadcrumbs, Button } from "@plane/ui"; // hooks import { useMobxStore } from "lib/mobx/store-provider"; import { observer } from "mobx-react-lite"; export const ProjectsHeader = observer(() => { const router = useRouter(); const { workspaceSlug } = router.query; // store const { project: projectStore, commandPalette: commandPaletteStore, trackEvent: { setTrackElement }, } = useMobxStore(); const projectsList = workspaceSlug ? projectStore.projects[workspaceSlug.toString()] : []; return (
} label="Projects" />
{projectsList?.length > 0 && (
projectStore.setSearchQuery(e.target.value)} placeholder="Search" />
)}
); });