import { FC } from "react"; import { observer } from "mobx-react-lite"; // lib import { useMobxStore } from "lib/mobx/store-provider"; // components import { ProjectCard } from "components/project"; import { Loader } from "@plane/ui"; // images import emptyProject from "public/empty-state/empty_project.webp"; // icons import { NewEmptyState } from "components/common/new-empty-state"; export interface IProjectCardList { workspaceSlug: string; } export const ProjectCardList: FC = observer((props) => { const { workspaceSlug } = props; // store const { project: projectStore, commandPalette: commandPaletteStore, trackEvent: { setTrackElement }, } = useMobxStore(); const projects = workspaceSlug ? projectStore.projects[workspaceSlug.toString()] : null; if (!projects) { return ( ); } return ( <> {projects.length > 0 ? (
{projectStore.searchedProjects.length == 0 ? (
No matching projects
) : (
{projectStore.searchedProjects.map((project) => ( ))}
)}
) : ( { setTrackElement("PROJECTS_EMPTY_STATE"); commandPaletteStore.toggleCreateProjectModal(true); }, }} /> )} ); });