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 { EmptyState } from "components/common"; import { Loader } from "@plane/ui"; // images import emptyProject from "public/empty-state/project.svg"; // icons import { Plus } from "lucide-react"; export interface IProjectCardList { workspaceSlug: string; } export const ProjectCardList: FC = observer((props) => { const { workspaceSlug } = props; // store const { project: projectStore, commandPalette: commandPaletteStore } = 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) => ( ))}
)}
) : ( , text: "New Project", onClick: () => commandPaletteStore.toggleCreateProjectModal(true), }} /> )} ); });